ibzib commented on a change in pull request #12063:
URL: https://github.com/apache/beam/pull/12063#discussion_r458263018



##########
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:
       There are two ways of running Beam Python Flink/Spark. One way involves 
starting a Java job server, the other (newer) way does not require a Java job 
server and instead uses only Python. When using a Java job server, it's easy to 
get metrics, since the job server has access to the Flink/Spark context object. 
But in Python, we rely on the Flink REST API to get metrics, so the formatting 
of the results displayed there is important.
   
   The reason metrics formatting isn't a problem for Spark is that 
spark_uber_jar_job_server.py just doesn't implement get_metrics yet.
   
   The problem is that if we want to make `MetricsContainerStepMap::toString` 
human-readable, we'll need to make the protobuf-formatted metrics accessible 
somewhere else.
   
   Perhaps there is a compromise though if we can somehow format metrics so 
they are readable both by the proto parser and humans.




----------------------------------------------------------------
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]


Reply via email to