npawar commented on code in PR #9058:
URL: https://github.com/apache/pinot/pull/9058#discussion_r922536269


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTaskRestletResource.java:
##########
@@ -231,6 +236,23 @@ public Map<String, 
PinotHelixTaskResourceManager.TaskDebugInfo> getTasksDebugInf
     return _pinotHelixTaskResourceManager.getTasksDebugInfoByTable(taskType, 
tableNameWithType, verbosity);
   }
 
+  @GET
+  @Path("/tasks/generator/{tableNameWithType}/{taskType}/debug")
+  @ApiOperation("Fetch task generation information for the recent runs of the 
given task for the given table")
+  public BaseTaskGeneratorInfo getTaskGenerationDebugInto(
+      @ApiParam(value = "Task type", required = true) @PathParam("taskType") 
String taskType,
+      @ApiParam(value = "Table name with type", required = true) 
@PathParam("tableNameWithType")
+          String tableNameWithType) {
+    BaseTaskGeneratorInfo
+        taskGeneratorMostRecentRunInfo = 
_taskManagerStatusCache.fetchTaskGeneratorInfo(tableNameWithType, taskType);

Review Comment:
   > @saurabhd336 thanks a lot for your contribution. It has been hard to debug 
minions, so I totally understand your pain point. However, I have a few general 
questions:
   > 
   > 1. What is the use case where you think this will help? (we have some use 
cases where we saw problems, and instead of introducing one new API per use 
case, I am looking to make sure we do something that works for more than one. 
@sajjad-moradi  can review from our standpoint).
   > 2. I know @npawar referred to a debug API on the minion, but I could not 
locate one. Please correct me if I am wrong. I think we should issue an API to 
the minions as well (liek we do with servers) and get the latest status form 
them and display it in the controller.
   
   Hey Subbu, this is the one for Minion tasks: `/tasks/task/{taskName}/debug`. 
In the list of subtasks returned, there's an "info" field which contains the 
exception (if any) encountered by this task



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