You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/03/09 17:51:51 UTC

[GitHub] [beam] chamikaramj commented on a change in pull request #14175: [BEAM-10402] Turn on nullness checking in DataflowMetrics

chamikaramj commented on a change in pull request #14175:
URL: https://github.com/apache/beam/pull/14175#discussion_r590590841



##########
File path: runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowMetrics.java
##########
@@ -280,22 +296,25 @@ private boolean isMetricTentative(MetricUpdate metricUpdate) {
      * @return a {@link MetricKey} that can be hashed and used to identify a metric.
      */
     private @Nullable MetricKey getMetricHashKey(MetricUpdate metricUpdate) {
-      String internalStepName = metricUpdate.getName().getContext().get("step");
-      String userStepName = getUserStepName(internalStepName);
-
-      if (userStepName == null
-          && (dataflowPipelineJob.transformStepNames == null
-              || !dataflowPipelineJob.transformStepNames.inverse().containsKey(internalStepName))) {
-        // If we can't translate internal step names to user step names, we just skip them
-        // altogether.
+      // If we can't translate internal step names to user step names, give up early
+      if (dataflowPipelineJob.transformStepNames == null) {

Review comment:
       We do not need "dataflowPipelineJob.transformStepNames" for portable job submission. So we should not return here if we can find a valid step name.




----------------------------------------------------------------
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:
users@infra.apache.org