Repository navigation
[BEAM-4775] Metrics improvements: make wordcount.py work with attempted metrics - #7656
Conversation
| """Short-hand for falling back to attempted metrics if it seems that | ||
| committed was not populated (e.g. due to not being supported on a given | ||
| runner""" | ||
| return self.committed if self.committed else self.attempted |
There was a problem hiding this comment.
Stupid question: What is the difference between the two?
There was a problem hiding this comment.
It is a good question!
I believe "committed" consists only of updates from task-attempts that succeeded, whereas "attempted" contains cumulative updates from all task-attempts; this comment in MetricResult is somewhat canonical. I think this is the original design doc about it, though I think it's out of date now.
Flink only supports "attempted" metrics (in Beam; maybe in general?); here's an example where it only fetches "attempted" metric updates. If you have thoughts about the necessity of this restriction from a Flink PoV I'd love to hear them!
A confusing thing is that MetricContainerImpl discusses "commit"s to MetricCells but I don't think it's referring to the same thing.
There was a problem hiding this comment.
Thanks for clarifying. Flink does not support committed metrics per se, though it looks like you could work around this by changing the metrics template to include the execution attempt id.
- MetricKey - MetricName - MetricQueryResults - MetricsContainerStepMap
b4b5495 to
8976c9e
Compare
| """Short-hand for falling back to attempted metrics if it seems that | ||
| committed was not populated (e.g. due to not being supported on a given | ||
| runner""" | ||
| return self.committed if self.committed else self.attempted |
There was a problem hiding this comment.
Thanks for clarifying. Flink does not support committed metrics per se, though it looks like you could work around this by changing the metrics template to include the execution attempt id.
also add some
toStrings for Metrics-related classes that have been useful for debugging/logging, and fixes some comment typos that slipped in in #7621.These were pulled out of #7641 to try to keep it simpler
R: @tweise, @mxm
Post-Commit Tests Status (on master branch)