mcvsubbu commented on a change in pull request #7091: URL: https://github.com/apache/incubator-pinot/pull/7091#discussion_r658926450
########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java ########## @@ -258,6 +262,50 @@ public synchronized String submitTask(List<PinotTaskConfig> pinotTaskConfigs, St return taskStates; } + /** + * This method helps compute the percentage done for a task (that may have many partitions or sub-tasks). + * @param parentTaskName (e.g. "Task_TestTask_1624403781879") + * @return a pair of integers, first one being the total number partitions and the second being number of partitions + * still running or yet to run. + */ + public synchronized TaskCount getTaskCount(String parentTaskName) { + JobContext jobContext = _taskDriver.getJobContext(getHelixJobName(parentTaskName)); + TaskCount taskCount = new TaskCount(); + for (int partition : jobContext.getPartitionSet()) { + taskCount.addToTotal(1); Review comment: Done ########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java ########## @@ -258,6 +262,50 @@ public synchronized String submitTask(List<PinotTaskConfig> pinotTaskConfigs, St return taskStates; } + /** + * This method helps compute the percentage done for a task (that may have many partitions or sub-tasks). + * @param parentTaskName (e.g. "Task_TestTask_1624403781879") + * @return a pair of integers, first one being the total number partitions and the second being number of partitions 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: 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