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



##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessInstanceController.java
##########
@@ -204,6 +204,28 @@ public Result queryProcessInstanceById(@ApiIgnore 
@RequestAttribute(value = Cons
         return returnDataList(result);
     }
 
+    @ApiOperation(value = "queryTopNLongestRunningProcessInstance", notes = 
"QUERY_TOPN_LONGEST_RUNNING_PROCESS_INSTANCE_NOTES")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "size", value = "PROCESS_INSTANCE_SIZE", 
dataType = "Int", example = "10"),
+            @ApiImplicitParam(name = "startTime", value = 
"PROCESS_INSTANCE_START_TIME", dataType = "String"),
+            @ApiImplicitParam(name = "endTime", value = 
"PROCESS_INSTANCE_END_TIME", dataType = "String"),
+    })
+    @GetMapping(value = "/top-n")
+    @ResponseStatus(HttpStatus.OK)
+    @ApiException(QUERY_PROCESS_INSTANCE_BY_ID_ERROR)
+    public Result queryTopNLongestRunningProcessInstance(@ApiIgnore 
@RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+                                                         @ApiParam(name = 
"projectName", value = "PROJECT_NAME", required = true) @PathVariable String 
projectName,
+                                                         @RequestParam("size") 
Integer size,
+                                                         @RequestParam(value = 
"startTime",required = true) String startTime,
+                                                         @RequestParam(value = 
"endTime",required = true) String endTime
+
+    ){
+        logger.info("query top {} SUCCESS process instance order by running 
time which started between startTime and endTime ,login user:{},project 
name:{}",size,
+                loginUser.getUserName(),projectName);

Review comment:
       could you please 
   
   > In this case, this kind of log does not make much sense, on the other 
hand, it makes our log files huge.
   
   could you please give me some advice on how to make the log meaningful?
   I have found that I should replace the starttime and endtime with params




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


Reply via email to