sv2000 commented on a change in pull request #2820: [GOBBLIN-974] Avoid 
updating job/flow status if messages arrive out of order
URL: https://github.com/apache/incubator-gobblin/pull/2820#discussion_r349128974
 
 

 ##########
 File path: 
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/KafkaJobStatusMonitor.java
 ##########
 @@ -146,6 +151,19 @@ static void 
addJobStatusToStateStore(org.apache.gobblin.configuration.State jobS
     String storeName = jobStatusStoreName(flowGroup, flowName);
     String tableName = jobStatusTableName(flowExecutionId, jobGroup, jobName);
 
+    List<org.apache.gobblin.configuration.State> states = 
stateStore.getAll(storeName, tableName);
+    if (states.size() > 0) {
+      String previousStatus = states.get(states.size() - 
1).getProp(JobStatusRetriever.EVENT_NAME_FIELD);
+      String currentStatus = 
jobStatus.getProp(JobStatusRetriever.EVENT_NAME_FIELD);
 
 Review comment:
   Not sure if getProp() returns null in case of missing key or throws an 
Exception?

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