kennknowles commented on a change in pull request #14097:
URL: https://github.com/apache/beam/pull/14097#discussion_r583227413
##########
File path:
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/util/MonitoringUtil.java
##########
@@ -219,6 +202,31 @@ 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);
+ switch (stateName) {
Review comment:
I also inlined the map because it was less flexible and less readable
than a simple `switch`.
----------------------------------------------------------------
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]