tvalentyn commented on a change in pull request #14070:
URL: https://github.com/apache/beam/pull/14070#discussion_r582171202



##########
File path: 
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/util/MonitoringUtil.java
##########
@@ -219,6 +220,11 @@ public static String 
getGcloudCancelCommand(DataflowPipelineOptions options, Str
   }
 
   public static State toState(String stateName) {
-    return 
MoreObjects.firstNonNull(DATAFLOW_STATE_TO_JOB_STATE.get(stateName), 
State.UNRECOGNIZED);
+    @Nullable State recognizedState = 
DATAFLOW_STATE_TO_JOB_STATE.get(stateName);
+    if (recognizedState != null) {
+      return recognizedState;
+    }
+    LOG.warn("Unrecognized state from Dataflow service: {}", stateName);

Review comment:
       Should we add a note: "Consider upgrading to a newer version of Beam" 
and/or an explanation: "This likely means that you are using an old version of 
Beam SDK". ?




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