ramabme commented on a change in pull request #7300: URL: https://github.com/apache/pinot/pull/7300#discussion_r690800073
########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java ########## @@ -427,29 +498,161 @@ private static String getTaskType(String name) { return name.split(TASK_NAME_SEPARATOR)[1]; } - public static class TaskCount { - private int _waiting; // Number of tasks waiting to be scheduled on minions - private int _error; // Number of tasks in error - private int _running; // Number of tasks currently running in minions - private int _total; // Total number of tasks in the batch + @JsonPropertyOrder({"taskState", "subTaskCount", "startTime", "executionStartTime", "subTaskInfos"}) + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class TaskDebugInfo { + private String _startTime; + private String _executionStartTime; + private TaskState _taskState; + private TaskCount _subTaskCount; + private List<TaskPartitionDebugInfo> _subTaskInfos; - public TaskCount() { + public TaskDebugInfo() { + } + + public void setStartTime(String startTime) { + _startTime = startTime; + } + + public void setExecutionStartTime(String executionStartTime) { + _executionStartTime = executionStartTime; + } + + public void setTaskState(TaskState taskState) { + _taskState = taskState; + } + + public void setSubTaskCount(TaskCount subTaskCount) { + _subTaskCount = subTaskCount; + } + + public void addSubTaskInfo(TaskPartitionDebugInfo subTaskInfo) { + if (_subTaskInfos == null) { + _subTaskInfos = new ArrayList<>(); + } + _subTaskInfos.add(subTaskInfo); + } + + public String getStartTime() { + return _startTime; + } + + public String getExecutionStartTime() { + return _executionStartTime; + } + + public TaskState getTaskState() { + return _taskState; } - public void addToWaiting(int waiting) { - _waiting += waiting; + public TaskCount getSubTaskCount() { + return _subTaskCount; } - public void addToRunning(int running) { - _running += running; + public List<TaskPartitionDebugInfo> getSubTaskInfos() { + return _subTaskInfos; + } + } + + @JsonPropertyOrder({"taskId", "state", "startTime", "finishTime", "participant", "info", "taskConfig"}) + @JsonInclude(JsonInclude.Include.NON_NULL) + public static class TaskPartitionDebugInfo { Review comment: Renamed TaskPartitionDebugInfo to SubtaskDebugInfo -- 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