abhishekrb19 commented on code in PR #17353:
URL: https://github.com/apache/druid/pull/17353#discussion_r1950110067


##########
indexing-service/src/main/java/org/apache/druid/indexing/scheduledbatch/ScheduledBatchSupervisorStatus.java:
##########
@@ -21,97 +21,137 @@
 
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonProperty;
-import org.apache.druid.indexer.TaskStatus;
 import org.joda.time.DateTime;
 import org.joda.time.Duration;
 
 import javax.annotation.Nullable;
-import java.util.Map;
+import java.util.List;
 
-public class ScheduledBatchSupervisorSnapshot
+/**
+ * Represents the status of a scheduled batch supervisor, including its state,
+ * scheduler details, task execution aggregate counts, and recent task 
activity.
+ */
+public class ScheduledBatchSupervisorStatus
 {
-  public enum BatchSupervisorStatus
-  {
-    SCHEDULER_RUNNING,
-    SCHEDULER_SHUTDOWN
-  }
-
-  @JsonProperty
   private final String supervisorId;
 
-  @JsonProperty
-  private final BatchSupervisorStatus status;
+  private final ScheduledBatchSupervisor.State state;
 
   @Nullable
-  @JsonProperty
   private final DateTime lastTaskSubmittedTime;
 
   @Nullable
-  @JsonProperty
   private final DateTime nextTaskSubmissionTime;
 
   @Nullable
-  @JsonProperty
   private final Duration timeUntilNextTaskSubmission;
 
-  @JsonProperty
-  private final Map<String, TaskStatus> activeTasks;
+  private final Integer totalSubmittedTasks;
 
-  @JsonProperty
-  private final Map<String, TaskStatus> completedTasks;
+  private final Integer totalSuccessfulTasks;
+
+  private final Integer totalFailedTasks;
+
+  private final List<BatchSupervisorTaskStatus> recentActiveTasks;
+
+  private final List<BatchSupervisorTaskStatus> recentSuccessfulTasks;
+
+  private final List<BatchSupervisorTaskStatus> recentFailedTasks;

Review Comment:
   Updated to use a single list `recentTasks`.



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