You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2019/08/19 20:18:07 UTC

[GitHub] [incubator-gobblin] arjun4084346 commented on a change in pull request #2715: [GOBBLIN-860] Process flow-level events for setting/retrieving flow status

arjun4084346 commented on a change in pull request #2715: [GOBBLIN-860] Process flow-level events for setting/retrieving flow status
URL: https://github.com/apache/incubator-gobblin/pull/2715#discussion_r315392590
 
 

 ##########
 File path: gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowStatusResource.java
 ##########
 @@ -106,14 +107,22 @@ private FlowStatus convertFlowStatus(org.apache.gobblin.service.monitoring.FlowS
     JobStatusArray jobStatusArray = new JobStatusArray();
     FlowId flowId = new FlowId().setFlowName(monitoringFlowStatus.getFlowName())
         .setFlowGroup(monitoringFlowStatus.getFlowGroup());
-    long flowStartTime = Long.MAX_VALUE;
-    long flowEndTime = -1L;
-    // flow execution status is complete unless job status indicates it is running or failed
-    ExecutionStatus flowExecutionStatus = ExecutionStatus.COMPLETE;
+
+    long flowEndTime = 0L;
+    ExecutionStatus flowExecutionStatus = ExecutionStatus.$UNKNOWN;
+
     StringBuffer flowMessagesStringBuffer = new StringBuffer();
 
     while (jobStatusIter.hasNext()) {
       org.apache.gobblin.service.monitoring.JobStatus queriedJobStatus = jobStatusIter.next();
+
+      // Check if this is the flow status instead of a single job status
+      if (queriedJobStatus.getJobName().equals(JobStatusRetriever.NA_KEY) && queriedJobStatus.getJobGroup().equals(JobStatusRetriever.NA_KEY)) {
 
 Review comment:
   maybe move this to a separate method `boolean isFlowStatus(JobStatus)` for readability purpose.

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


With regards,
Apache Git Services