abhishekrb19 commented on code in PR #19114:
URL: https://github.com/apache/druid/pull/19114#discussion_r2915134134
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorManager.java:
##########
@@ -88,6 +89,26 @@ 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 SupervisorSpec spec = entry.getValue().rhs;
+ final SupervisorStateManager.State state =
entry.getValue().lhs.getState();
+
+ stats.add(new SupervisorStatsProvider.SupervisorStats(
+ spec.getId(),
+ spec.getType(),
+ state == null ? "UNKNOWN" : state.getBasicState().toString(),
+ DefaultQueryMetrics.getTableNamesAsString(new
HashSet<>(spec.getDataSources())),
+ spec.getSource(),
Review Comment:
It looks like `jacoco-coverage` is failing due to lack of code coverage for
this new method, which seems legitimate. Could you please add a few unit tests
in `SupervisorManagerTest`?
--
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]