Sort job status array when returning flow status
Closes from jack-moseley/sort-job-status
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;
