aruraghuwanshi commented on code in PR #19114:
URL: https://github.com/apache/druid/pull/19114#discussion_r2914118199


##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorManager.java:
##########
@@ -88,6 +87,29 @@ public Set<String> getSupervisorIds()
     return supervisors.keySet();
   }
 
+  @Override
+  public Collection<SupervisorStatsProvider.SupervisorStats> 
getSupervisorStats()
+  {
+    List<SupervisorStatsProvider.SupervisorStats> stats = new ArrayList<>();
+    for (Map.Entry<String, Pair<Supervisor, SupervisorSpec>> entry : 
supervisors.entrySet()) {
+      final String supervisorId = entry.getKey();
+      final Supervisor supervisor = entry.getValue().lhs;
+      final SupervisorSpec spec = entry.getValue().rhs;
+
+      SupervisorStateManager.State state = supervisor.getState();
+      String stateStr = state != null && state.getBasicState() != null
+                        ? state.getBasicState().toString()
+                        : "UNKNOWN";
+

Review Comment:
   Adding `detailedState` makes sense. For most supervisors it will match 
state, but for unhealthy SeekableStreamSupervisors it gives more granular 
values.  



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