jtuglu1 commented on code in PR #18662:
URL: https://github.com/apache/druid/pull/18662#discussion_r2441502334
##########
processing/src/main/java/org/apache/druid/java/util/common/lifecycle/Lifecycle.java:
##########
@@ -363,13 +364,14 @@ public void stop()
Exception thrown = null;
for (Stage s : handlers.navigableKeySet().descendingSet()) {
- log.info("Stopping lifecycle [%s] stage [%s]", name, s.name());
- for (Handler handler : Lists.reverse(handlers.get(s))) {
+ final List<Handler> handlersToStop = Lists.reverse(handlers.get(s));
+ log.info("Stopping lifecycle [%s] stage [%s] for handlers [%s]", name,
s.name(), handlersToStop);
+ for (Handler handler : handlersToStop) {
try {
handler.stop();
}
catch (Exception e) {
- log.warn(e, "Lifecycle [%s] encountered exception while stopping
%s", name, handler);
+ log.warn(e, "Lifecycle [%s] encountered exception while stopping
[%s]", name, handler);
Review Comment:
nit: stopping handler [%s] to match other logs.
##########
processing/src/main/java/org/apache/druid/java/util/common/lifecycle/Lifecycle.java:
##########
@@ -476,6 +478,12 @@ public void stop()
}
}
}
+
+ @Override
+ public String toString()
+ {
+ return o.getClass().getSimpleName();
Review Comment:
If there are duplicate handlers with same simpleName, do we care about
differentiating them?
--
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]