ibzib commented on a change in pull request #12063:
URL: https://github.com/apache/beam/pull/12063#discussion_r460179800
##########
File path:
runners/spark/src/main/java/org/apache/beam/runners/spark/metrics/SparkMetricsContainerStepMap.java
##########
@@ -27,7 +27,7 @@
@Override
public String toString() {
- return new SparkBeamMetric().renderAll().toString();
+ return asAttemptedOnlyMetricResults(this).toString();
Review comment:
> @ibzib Thanks for more details. I see the picture bit still not
convinced why MetricsContainerStepMap::toString is used for REST API (if I get
it right) - dedicated way to make the protobuf-formatted metrics accessible, as
you said, should be better imho.
The reason I used `toString` is because the Flink REST API displays
accumulator values using `toString`. I simply wasn't able to come up with a
dedicated way to make the protobuf-formatted metrics accessible.
> Are you ok to merge this fix for Spark Runner metrics?
Yes, this is fine for now. I might need to give Flink runner metrics another
look to fix the equivalent problem there.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]