ramabme commented on a change in pull request #7300: URL: https://github.com/apache/pinot/pull/7300#discussion_r688957805
########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java ########## @@ -452,6 +640,25 @@ public void addToError(int error) { _error += error; } + public void addToCompleted(int completed) { + _completed += completed; + } + + /* Update count based on state for each task running under a HelixJob/PinotTask */ + public void addTaskState(TaskPartitionState state) { + // Helix returns state as null if the task is not enqueued anywhere yet + if (state == null) { + // task is not yet assigned to a participant + addToWaiting(1); + } else if (state.equals(TaskPartitionState.INIT) || state.equals(TaskPartitionState.RUNNING)) { + addToRunning(1); + } else if (state.equals(TaskPartitionState.TASK_ERROR)) { + addToError(1); + } else if (state.equals(TaskPartitionState.COMPLETED)) { + addToCompleted(1); + } Review comment: added -- 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