Repository navigation
[BEAM-4776] consolidate MetricResult implementations - #7890
Merged
Merged
Conversation
Contributor
Author
|
Run Java_Examples_Dataflow PreCommit |
Contributor
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(factored out of #7823)
This simplifies something I found confusing while learning how the Java SDK metrics worked: there were many implementations of
MetricResultlaying around, all with almost the same semantics (and a fair amount of copy-paste having happened between them).I think I've reduced this to a minimal interface here:
@Nullable, for pcollection-scoped system metrics; first-class support of these is coming in [DO NOT MERGE] [BEAM-4775] Second take on portable metrics over the job-server API #7823) andMetricName(namespace, name)null/ "unsupported") "committed" valuethrowsUnsupportedOperationExceptionon attempting to access absent/unsupported "committed" valueMetricUpdates, including a transient interim step where "attempted" but not "committed" may be set, for aMetricResultthat will ultimately contain both.MetricsContainerStepMapin particular had oneMetricResultimplementation (that was already basically redundant with others in the codebase), and another just like it that acted as an unofficial sort of "builder"; both are gone now.R: @robertwb, @ajamato
I'll CC @mxm @tweise as well since I've sent a bunch to Robert/Alex on this topic, and this one doesn't directly involve the new metrics API design
Post-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.