Github user Ethanlm commented on a diff in the pull request:
https://github.com/apache/storm/pull/2789#discussion_r209274273
--- Diff:
storm-server/src/main/java/org/apache/storm/pacemaker/Pacemaker.java ---
@@ -49,7 +49,7 @@ public Pacemaker(Map<String, Object> conf) {
heartbeats = new ConcurrentHashMap<>();
this.conf = conf;
StormMetricsRegistry.registerGauge("pacemaker:size-total-keys",
heartbeats::size);
- StormMetricsRegistry.startMetricsReporters(conf);
+
Utils.addShutdownHookWithForceKillIn1Sec(StormMetricsRegistry.startMetricsReporters(conf)::close);
--- End diff --
better to break this into two lines
---