ThriftServer server = createServer(serverIndex, configuration);
server.start();
}
public static ThriftServer createServer(int serverIndex, BlurConfiguration configuration) throws Exception {
Thread.setDefaultUncaughtExceptionHandler(new SimpleUncaughtExceptionHandler());
String bindAddress = configuration.get(BLUR_CONTROLLER_BIND_ADDRESS);
int bindPort = configuration.getInt(BLUR_CONTROLLER_BIND_PORT, -1);
bindPort += serverIndex;
LOG.info("Shard Server using index [{0}] bind address [{1}]", serverIndex, bindAddress + ":" + bindPort);