This is an automated email from the ASF dual-hosted git repository.

suvasude pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-gobblin.git


The following commit(s) were added to refs/heads/master by this push:
     new 4f1ab60  [GOBBLIN-1074] Sort job status array when returning flow 
status
4f1ab60 is described below

commit 4f1ab6072408b719ee4ab2af6eb4bd963e6622c5
Author: Jack Moseley <[email protected]>
AuthorDate: Fri Mar 6 16:47:52 2020 -0800

    [GOBBLIN-1074] Sort job status array when returning flow status
    
    Closes #2914 from jack-moseley/sort-job-status
---
 .../main/java/org/apache/gobblin/service/FlowExecutionResource.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowExecutionResource.java
 
b/gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowExecutionResource.java
index 960415d..43c926b 100644
--- 
a/gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowExecutionResource.java
+++ 
b/gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowExecutionResource.java
@@ -17,6 +17,7 @@
 
 package org.apache.gobblin.service;
 
+import java.util.Comparator;
 import java.util.Iterator;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -169,6 +170,8 @@ public class FlowExecutionResource extends 
ComplexKeyResourceTemplate<FlowStatus
       }
     }
 
+    jobStatusArray.sort(Comparator.comparing((JobStatus js) -> 
js.getExecutionStatistics().getExecutionStartTime()));
+
     String flowMessages = flowMessagesStringBuffer.length() > 0 ?
         flowMessagesStringBuffer.substring(0, 
flowMessagesStringBuffer.length() -
             MESSAGE_SEPARATOR.length()) : StringUtils.EMPTY;

Reply via email to