public static RPC.Server startProtocolServer(int srvPort, int numHandlers, AtomicReference<InetSocketAddress> bindAddress, Configuration conf, BlockingService impl, Class<?> protocolClass, SecretManager<?> secretManager, PolicyProvider provider, ConfVars... aclVars) { InetSocketAddress addr = new InetSocketAddress(srvPort); RPC.Server server; try { server = createRpcServer(protocolClass, addr, conf, numHandlers, impl, secretManager, provider, aclVars); server.start(); } catch (IOException e) { LOG.error("Failed to run RPC Server on port: " + srvPort, e); throw new RuntimeException(e); } InetSocketAddress serverBindAddress = NetUtils.getConnectAddress(server); InetSocketAddress bindAddressVal = NetUtils.createSocketAddrForHost( serverBindAddress.getAddress().getCanonicalHostName(), serverBindAddress.getPort()); if (bindAddress != null) { bindAddress.set(bindAddressVal); } LOG.info("Instantiated " + protocolClass.getSimpleName() + " at " + bindAddressVal); return server; }
public void start() throws IOException { if (UserGroupInformation.isSecurityEnabled()) { throw new UnsupportedOperationException("Unable to start " + "InMemoryLevelDBAliasMapServer as security is enabled"); } RPC.setProtocolEngine(getConf(), AliasMapProtocolPB.class, ProtobufRpcEngine.class); AliasMapProtocolServerSideTranslatorPB aliasMapProtocolXlator = new AliasMapProtocolServerSideTranslatorPB(this); BlockingService aliasMapProtocolService = AliasMapProtocolService .newReflectiveBlockingService(aliasMapProtocolXlator); InetSocketAddress rpcAddress = getBindAddress(conf, DFS_PROVIDED_ALIASMAP_INMEMORY_RPC_ADDRESS, DFS_PROVIDED_ALIASMAP_INMEMORY_RPC_ADDRESS_DEFAULT, DFS_PROVIDED_ALIASMAP_INMEMORY_RPC_BIND_HOST); boolean setVerbose = conf.getBoolean( DFS_PROVIDED_ALIASMAP_INMEMORY_SERVER_LOG, DFS_PROVIDED_ALIASMAP_INMEMORY_SERVER_LOG_DEFAULT); aliasMapServer = new RPC.Builder(conf) .setProtocol(AliasMapProtocolPB.class) .setInstance(aliasMapProtocolService) .setBindAddress(rpcAddress.getHostName()) .setPort(rpcAddress.getPort()) .setNumHandlers(1) .setVerbose(setVerbose) .build(); LOG.info("Starting InMemoryLevelDBAliasMapServer on {}", rpcAddress); aliasMapServer.start(); }
/** * start rpc server * * @throws java.io.IOException */ public void start() throws IOException { rpcServer = new RPC.Builder(new Configuration()).setProtocol(IServer.class) .setInstance(server).setBindAddress(InetAddress.getLocalHost().getHostAddress()).setPort(rpcServerPort) .setNumHandlers(slaveNum * 2).build(); rpcServer.start(); LOG.info("rpc server started!, rpcport=" + rpcServer.getPort()); }
void start() { this.server.start(); }
void start() { this.server.start(); }
@Override public void startImpl() { ipcServer.start(); }
void start() { this.server.start(); }
/** Start a single datanode daemon and wait for it to finish. * If this thread is specifically interrupted, it will stop waiting. */ public void runDatanodeDaemon() throws IOException { blockPoolManager.startAll(); // start dataXceiveServer dataXceiverServer.start(); if (localDataXceiverServer != null) { localDataXceiverServer.start(); } ipcServer.start(); startPlugins(conf); }
void start() { this.server.start(); }
/** Start a single datanode daemon and wait for it to finish. * If this thread is specifically interrupted, it will stop waiting. */ public void runDatanodeDaemon() throws IOException { blockPoolManager.startAll(); // start dataXceiveServer dataXceiverServer.start(); if (localDataXceiverServer != null) { localDataXceiverServer.start(); } ipcServer.start(); startPlugins(conf); }
@Override protected void serviceStart() throws Exception { if (UserGroupInformation.isSecurityEnabled()) { loginUGI = UserGroupInformation.getLoginUser(); } else { loginUGI = UserGroupInformation.getCurrentUser(); } clientRpcServer.start(); }
@Override protected void serviceStart() throws Exception { if (UserGroupInformation.isSecurityEnabled()) { loginUGI = UserGroupInformation.getLoginUser(); } else { loginUGI = UserGroupInformation.getCurrentUser(); } clientRpcServer.start(); }
/** * start rpc server * * @throws java.io.IOException */ public void start() throws IOException { rpcServer = new RPC.Builder(new Configuration()).setProtocol(IServer.class) .setInstance(server).setBindAddress(InetAddress.getLocalHost().getHostAddress()).setPort(rpcServerPort) .setNumHandlers(slaveNum * 2).build(); rpcServer.start(); LOG.info("rpc server started!, rpcport=" + rpcServer.getPort()); }
@Override protected void serviceStart() throws Exception { if (UserGroupInformation.isSecurityEnabled()) { loginUGI = UserGroupInformation.getLoginUser(); } else { loginUGI = UserGroupInformation.getCurrentUser(); } clientRpcServer.start(); }
/** Start a single datanode daemon and wait for it to finish. * If this thread is specifically interrupted, it will stop waiting. */ public void runDatanodeDaemon() throws IOException { blockPoolManager.startAll(); // start dataXceiveServer dataXceiverServer.start(); if (localDataXceiverServer != null) { localDataXceiverServer.start(); } ipcServer.setTracer(tracer); ipcServer.start(); startPlugins(getConf()); }
void start() { this.server.start(); }
void start() { this.server.start(); }