J-HowHuang commented on code in PR #17494:
URL: https://github.com/apache/pinot/pull/17494#discussion_r2756552156


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTaskRestletResource.java:
##########
@@ -190,9 +200,20 @@ public Set<String> listTaskTypes() {
   @Produces(MediaType.APPLICATION_JSON)
   @ApiOperation("Get summary of all tasks across all task types, grouped by 
tenant. "
       + "Optionally filter by server tenant name to get tasks for a specific 
tenant only.")
-  public PinotHelixTaskResourceManager.TaskSummaryResponse getTasksSummary(
+  @ManagedAsync
+  public void getTasksSummary(
       @ApiParam(value = "Server tenant name to filter tasks. If not specified, 
returns all tenants grouped.")
-      @QueryParam("tenant") @Nullable String tenantName) {
+      @QueryParam("tenant") @Nullable String tenantName,
+      @Suspended AsyncResponse asyncResponse) {
+    try {
+      PinotHelixTaskResourceManager.TaskSummaryResponse response = 
getTasksSummarySync(tenantName);
+      asyncResponse.resume(response);
+    } catch (Exception e) {
+      asyncResponse.resume(e);
+    }
+  }
+
+  private PinotHelixTaskResourceManager.TaskSummaryResponse 
getTasksSummarySync(@Nullable String tenantName) {

Review Comment:
   done



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to