// Stop metrics report if metrics monitor is disabled.
try {
StormMonitor monitor = zkCluster.get_storm_monitor(topologyId);
if (null != monitor) {
boolean newMetricsMonitor = monitor.getMetrics();
MetricReporter metricReporter = workerData.getMetricsReporter();
boolean oldMetricsMonitor = metricReporter.isEnable();
if (oldMetricsMonitor != newMetricsMonitor) {
metricReporter.setEnable(newMetricsMonitor);
if (true == newMetricsMonitor) {
LOG.info("Start metrics reporter");
} else {
LOG.info("Stop metrics reporter");
}