public String getMasterName() { return NetUtils.normalizeInetSocketAddress(tajoMasterService.getBindAddress()); }
public String getMasterName() { return NetUtils.normalizeInetSocketAddress(tajoMasterService.getBindAddress()); }
public String getConnectString() { return NetUtils.normalizeInetSocketAddress(cnxnFactory.getLocalAddress()); } }
@Override public void serviceInit(Configuration conf) throws Exception { TajoConf tajoConf = TUtil.checkTypeAndGet(conf, TajoConf.class); try { // Setup RPC server InetSocketAddress initIsa = new InetSocketAddress("0.0.0.0", port); if (initIsa.getAddress() == null) { throw new IllegalArgumentException("Failed resolve of " + initIsa); } int workerNum = tajoConf.getIntVar(TajoConf.ConfVars.WORKER_RPC_SERVER_WORKER_THREAD_NUM); this.rpcServer = new AsyncRpcServer(TajoWorkerProtocol.class, this, initIsa, workerNum); this.rpcServer.start(); this.bindAddr = NetUtils.getConnectAddress(rpcServer.getListenAddress()); this.port = bindAddr.getPort(); } catch (Exception e) { LOG.error(e.getMessage(), e); } // Get the master address LOG.info("TajoWorkerManagerService is bind to " + bindAddr); tajoConf.setVar(TajoConf.ConfVars.WORKER_PEER_RPC_ADDRESS, NetUtils.normalizeInetSocketAddress(bindAddr)); super.serviceInit(tajoConf); }
@Override public void serviceStart() throws Exception { InetSocketAddress initIsa = conf.getSocketAddrVar(TajoConf.ConfVars.TAJO_MASTER_UMBILICAL_RPC_ADDRESS); int workerNum = conf.getIntVar(TajoConf.ConfVars.MASTER_RPC_SERVER_WORKER_THREAD_NUM); server = new AsyncRpcServer(QueryCoordinatorProtocol.class, masterHandler, initIsa, workerNum); server.start(); bindAddress = NetUtils.getConnectAddress(server.getListenAddress()); this.conf.setVar(TajoConf.ConfVars.TAJO_MASTER_UMBILICAL_RPC_ADDRESS, NetUtils.normalizeInetSocketAddress(bindAddress)); LOG.info("Instantiated TajoMasterService at " + this.bindAddress); super.serviceStart(); }
@Override public void serviceStart() throws Exception { String confMasterServiceAddr = conf.getVar(TajoConf.ConfVars.TAJO_MASTER_UMBILICAL_RPC_ADDRESS); InetSocketAddress initIsa = NetUtils.createSocketAddr(confMasterServiceAddr); int workerNum = conf.getIntVar(TajoConf.ConfVars.MASTER_RPC_SERVER_WORKER_THREAD_NUM); server = new AsyncRpcServer(QueryCoordinatorProtocol.class, masterHandler, initIsa, workerNum); server.start(); bindAddress = NetUtils.getConnectAddress(server.getListenAddress()); this.conf.setVar(TajoConf.ConfVars.TAJO_MASTER_UMBILICAL_RPC_ADDRESS, NetUtils.normalizeInetSocketAddress(bindAddress)); LOG.info("Instantiated TajoMasterService at " + this.bindAddress); super.serviceStart(); }
@Override public void serviceStart() throws Exception { // start the rpc server String confClientServiceAddr = conf.getVar(ConfVars.TAJO_MASTER_CLIENT_RPC_ADDRESS); InetSocketAddress initIsa = NetUtils.createSocketAddr(confClientServiceAddr); int workerNum = conf.getIntVar(ConfVars.MASTER_SERVICE_RPC_SERVER_WORKER_THREAD_NUM); server = new BlockingRpcServer(TajoMasterClientProtocol.class, clientHandler, initIsa, workerNum); server.start(); bindAddress = NetUtils.getConnectAddress(server.getListenAddress()); this.conf.setVar(ConfVars.TAJO_MASTER_CLIENT_RPC_ADDRESS, NetUtils.normalizeInetSocketAddress(bindAddress)); super.serviceStart(); LOG.info("Instantiated TajoMasterClientService at " + this.bindAddress); }
@Override public void serviceStart() throws Exception { String serverAddr = conf.getVar(ConfVars.CATALOG_ADDRESS); InetSocketAddress initIsa = NetUtils.createSocketAddr(serverAddr); int workerNum = conf.getIntVar(ConfVars.CATALOG_RPC_SERVER_WORKER_THREAD_NUM); try { this.rpcServer = new BlockingRpcServer(CatalogProtocol.class, handler, initIsa, workerNum); this.rpcServer.start(); this.bindAddress = NetUtils.getConnectAddress(this.rpcServer.getListenAddress()); this.bindAddressStr = NetUtils.normalizeInetSocketAddress(bindAddress); conf.setVar(ConfVars.CATALOG_ADDRESS, bindAddressStr); } catch (Exception e) { LOG.error("CatalogServer startup failed", e); throw new TajoInternalError(e); } LOG.info("Catalog Server startup (" + bindAddressStr + ")"); super.serviceStart(); }
@Override public void serviceInit(Configuration conf) throws Exception { TajoConf systemConf = TUtil.checkTypeAndGet(conf, TajoConf.class); activeInterval = systemConf.getIntVar(TajoConf.ConfVars.WORKER_HEARTBEAT_ACTIVE_INTERVAL); String confMasterServiceAddr = systemConf.getVar(TajoConf.ConfVars.RESOURCE_TRACKER_RPC_ADDRESS); InetSocketAddress initIsa = NetUtils.createSocketAddr(confMasterServiceAddr); int workerNum = systemConf.getIntVar(TajoConf.ConfVars.MASTER_RPC_SERVER_WORKER_THREAD_NUM); server = new AsyncRpcServer(TajoResourceTrackerProtocol.class, this, initIsa, workerNum); server.start(); bindAddress = NetUtils.getConnectAddress(server.getListenAddress()); // Set actual bind address to the systemConf systemConf.setVar(TajoConf.ConfVars.RESOURCE_TRACKER_RPC_ADDRESS, NetUtils.normalizeInetSocketAddress(bindAddress)); LOG.info("TajoResourceTracker starts up (" + this.bindAddress + ")"); super.serviceInit(conf); }
} catch (ConnectException e) { throw new TajoRuntimeException( new ClientUnableToConnectException(NetUtils.normalizeInetSocketAddress(qmAddress))); } finally { if (qmClient != null) {
} catch (ConnectException e) { throw new TajoRuntimeException( new ClientUnableToConnectException(NetUtils.normalizeInetSocketAddress(qmAddress))); } finally { if (qmClient != null) {