ruanwenjun commented on code in PR #11128:
URL: https://github.com/apache/dolphinscheduler/pull/11128#discussion_r928795328


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/metrics/ProcessInstanceMetrics.java:
##########
@@ -31,6 +36,24 @@ private ProcessInstanceMetrics() {
         throw new UnsupportedOperationException("Utility class");
     }
 
+    private static Map<String, Counter> PROCESS_INSTANCE_COUNTERS = new 
HashMap<>();
+
+    private static final Set<String> PROCESS_INSTANCE_STATES = ImmutableSet.of(
+            "submit", "timeout", "finish", "failover", "success", "fail", 
"stop");

Review Comment:
   It's better to directly use `ExecutionStatus.SUCCESS.getCode()` to replace 
the `success`, and use 
   ```java
   
ProcessInstanceMetrics.incProcessInstanceByState(ExecutionStatus.SUCCESS.getCode());
   ```
   to increase the counter.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to