zhtaoxiang commented on code in PR #10132:
URL: https://github.com/apache/pinot/pull/10132#discussion_r1073214804


##########
pinot-minion/src/main/java/org/apache/pinot/minion/api/resources/PinotTaskProgressResource.java:
##########
@@ -84,4 +86,34 @@ public String getSubtaskProgress(
           .build());
     }
   }
+
+  @GET
+  @Path("/tasks/subtask/state/{subTaskState}/progress")
+  @Produces(MediaType.APPLICATION_JSON)
+  @ApiOperation("Get finer grained task progress tracked in memory for 
subtasks with the given state")
+  @ApiResponses(value = {
+      @ApiResponse(code = 200, message = "Success"), @ApiResponse(code = 500, 
message = "Internal server error")
+  })
+  public String getSubtaskWithGivenStateProgress(

Review Comment:
   There is a minor problem when we merge those 2 methods.
   
   The existing `/tasks/subtask/progress` returns response in format of 
   `{"taskname":["....", "....", "..."]}`; 
   the newly-added one returns response in format of 
`{"taskname":{"progress":["....", "....", "..."], "taskState":"", 
"startTs":XXXX}}`
   
   I am concerned about (1) returning two different formats in the same method, 
or (2) changing the return format of the existing public API.
   
   Any suggestions to handle this in a clean way?



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

To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to