use of org.apache.storm.security.auth.ThriftServer in project storm by apache.
the class LocalCluster method startNimbusDaemon.
private static ThriftServer startNimbusDaemon(Map<String, Object> conf, Nimbus nimbus) {
ThriftServer ret = new ThriftServer(conf, new Processor<>(nimbus), ThriftConnectionType.NIMBUS);
LOG.info("Starting Nimbus server...");
new Thread(() -> ret.serve()).start();
return ret;
}
use of org.apache.storm.security.auth.ThriftServer in project storm by apache.
the class Nimbus method launchServer.
private static Nimbus launchServer(Map<String, Object> conf, INimbus inimbus) throws Exception {
StormCommon.validateDistributedMode(conf);
validatePortAvailable(conf);
final Nimbus nimbus = new Nimbus(conf, inimbus);
nimbus.launchServer();
final ThriftServer server = new ThriftServer(conf, new Processor<>(nimbus), ThriftConnectionType.NIMBUS);
Utils.addShutdownHookWithForceKillIn1Sec(() -> {
nimbus.shutdown();
server.stop();
});
LOG.info("Starting nimbus server for storm version '{}'", STORM_VERSION);
server.serve();
return nimbus;
}
Aggregations