RedemptionC commented on a change in pull request #3184:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/3184#discussion_r453281323



##########
File path: 
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
##########
@@ -1853,4 +1937,16 @@ public String formatTaskAppId(TaskInstance taskInstance){
                 taskInstance.getId());
     }
 
+    /**
+     * return top n SUCCESS process instance order by running time which 
started between startTime and endTime
+     *
+     * @param size
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    public List<ProcessInstance> topNLongestRunningProcessInstance(int size, 
Date startTime, Date endTime) {

Review comment:
       can I do the check like this?
   `        
if(size<=0||startTime==null||endTime==null||startTime.getTime()>endTime.getTime()){
               return new ArrayList<ProcessInstance>();
           } `




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to