arjun4084346 commented on a change in pull request #2635: [GOBBLIN-771] add  a 
few metrics for gobblin service
URL: https://github.com/apache/incubator-gobblin/pull/2635#discussion_r287184812
 
 

 ##########
 File path: 
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/Orchestrator.java
 ##########
 @@ -241,10 +233,15 @@ public void orchestrate(Spec spec) throws Exception {
       if (!canRun(flowName, flowGroup, allowConcurrentExecution)) {
         _log.warn("Another instance of flowGroup: {}, flowName: {} running; 
Skipping flow execution since "
             + "concurrent executions are disabled for this flow.", flowGroup, 
flowName);
-        if (this.flowAlreadyRunningGauge.isPresent()) {
-          this.jobAlreadyRunning.incrementAndGet();
-        }
+        // We send a gauge with value 0 signifying that the flow could not be 
compiled because previous execution is already running
+        metricContext.newContextAwareGauge(
+            
MetricRegistry.name(MetricReportUtils.GOBBLIN_SERVICE_METRICS_PREFIX, 
flowGroup, flowName, ServiceMetricNames.COMPILED),
+            () -> 0L);
 
 Review comment:
   No, O and 1 seems more intuitive. 0 means not compiled, 1 means compiled?

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


With regards,
Apache Git Services

Reply via email to