@Override protected void serviceStart() throws Exception { // start all the components super.serviceStart(); eventHandlingThread = new Thread(createThread()); eventHandlingThread.setName("AsyncDispatcher event handler"); eventHandlingThread.start(); }
@Override protected void serviceStart() throws Exception { scheduler = createSchedulerProxy(); register(); startAllocatorThread(); JobID id = TypeConverter.fromYarn(this.applicationId); JobId jobId = TypeConverter.toYarn(id); job = context.getJob(jobId); super.serviceStart(); }
@Override protected void serviceStart() throws Exception { // All the clients to appsManager are supposed to be authenticated via // Kerberos if security is enabled, so no secretManager. YarnRPC rpc = YarnRPC.create(getConfig()); Configuration clientServerConf = new Configuration(getConfig()); this.server = rpc.getServer( ApplicationClientProtocol.class, this, clientBindAddress, clientServerConf, null, 1); this.server.start(); super.serviceStart(); }
@Override protected void serviceStart() throws Exception { dtCancelThread.start(); if (tokenKeepAliveEnabled) { delayedRemovalThread = new Thread(new DelayedTokenRemovalRunnable(getConfig()), "DelayedTokenCanceller"); delayedRemovalThread.start(); } setLocalSecretManagerAndServiceAddr(); serviceStateLock.writeLock().lock(); isServiceStarted = true; serviceStateLock.writeLock().unlock(); while (!pendingEventQueue.isEmpty()) { processDelegationTokenRenewerEvent(pendingEventQueue.take()); } super.serviceStart(); }
@Override protected void serviceStart() throws Exception { try { proxyServer = new HttpServer("proxy", bindAddress, port, port == 0, getConfig(), acl); proxyServer.addServlet( ProxyUriUtils.PROXY_SERVLET_NAME, ProxyUriUtils.PROXY_PATH_SPEC, WebAppProxyServlet.class); proxyServer.setAttribute(FETCHER_ATTRIBUTE, fetcher); proxyServer.setAttribute(IS_SECURITY_ENABLED_ATTRIBUTE, isSecurityEnabled); proxyServer.setAttribute(PROXY_HOST_ATTRIBUTE, proxyHost); proxyServer.start(); } catch (IOException e) { LOG.fatal("Could not start proxy web server", e); throw new YarnRuntimeException("Could not start proxy web server", e); } super.serviceStart(); }
@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(); }
@SuppressWarnings("unchecked") @Override public void serviceStart() throws Exception { // start all the components startServices(); super.serviceStart(); this.state = DAGAppMasterState.IDLE; // metrics system init is really init & start. // It's more test friendly to put it here. DefaultMetricsSystem.initialize("DAGAppMaster"); this.appsStartTime = clock.getTime(); AMStartedEvent startEvent = new AMStartedEvent(appAttemptID, startTime, appsStartTime, appSubmitTime); dispatcher.getEventHandler().handle(new DAGHistoryEvent(startEvent)); this.lastDAGCompletionTime = clock.getTime(); if (!isSession) { startDAG(); } else { LOG.info("In Session mode. Waiting for DAG over RPC"); this.dagSubmissionTimer = new Timer(true); this.dagSubmissionTimer.scheduleAtFixedRate( new TimerTask() { @Override public void run() { checkAndHandleSessionTimeout(); } }, sessionTimeoutInterval, sessionTimeoutInterval / 10); } }