use of org.apache.storm.nimbus.ITopologyActionNotifierPlugin in project storm by apache.
the class Nimbus method createTopologyActionNotifier.
private static ITopologyActionNotifierPlugin createTopologyActionNotifier(Map<String, Object> conf) {
String clazz = (String) conf.get(DaemonConfig.NIMBUS_TOPOLOGY_ACTION_NOTIFIER_PLUGIN);
ITopologyActionNotifierPlugin ret = null;
if (clazz != null && !clazz.isEmpty()) {
ret = ReflectionUtils.newInstance(clazz);
try {
ret.prepare(conf);
} catch (Exception e) {
LOG.warn("Ignoring exception, Could not initialize {}", clazz, e);
ret = null;
}
}
return ret;
}
use of org.apache.storm.nimbus.ITopologyActionNotifierPlugin in project storm by apache.
the class Nimbus method shutdown.
@SuppressWarnings("deprecation")
@Override
public void shutdown() {
shutdownCalls.mark();
try {
LOG.info("Shutting down master");
timer.close();
stormClusterState.disconnect();
downloaders.cleanup();
uploaders.cleanup();
blobDownloaders.cleanup();
blobUploaders.cleanup();
blobListers.cleanup();
scheduler.cleanup();
blobStore.shutdown();
leaderElector.close();
assignmentsDistributer.close();
ITopologyActionNotifierPlugin actionNotifier = nimbusTopologyActionNotifier;
if (actionNotifier != null) {
actionNotifier.cleanup();
}
zkClient.close();
if (metricsStore != null) {
metricsStore.close();
}
clusterMetricSet.setActive(false);
LOG.info("Shut down master");
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Aggregations