private void initAndStartNodeManager(Configuration conf, boolean hasToReboot) { try { // Remove the old hook if we are rebooting. if (hasToReboot && null != nodeManagerShutdownHook) { ShutdownHookManager.get().removeShutdownHook(nodeManagerShutdownHook); } nodeManagerShutdownHook = new CompositeServiceShutdownHook(this); ShutdownHookManager.get().addShutdownHook(nodeManagerShutdownHook, SHUTDOWN_HOOK_PRIORITY); // System exit should be called only when NodeManager is instantiated from // main() funtion this.shouldExitOnShutdownEvent = true; this.init(conf); this.start(); } catch (Throwable t) { LOG.fatal("Error starting NodeManager", t); System.exit(-1); } }
protected synchronized void serviceStart() throws Exception { nodeManagers[index].start(); if (nodeManagers[index].getServiceState() != STATE.STARTED) { // NM could have failed. throw new IOException("NodeManager " + index + " failed to start"); } super.serviceStart(); }
protected synchronized void serviceStart() throws Exception { nodeManagers[index].start(); if (nodeManagers[index].getServiceState() != STATE.STARTED) { // NM could have failed. throw new IOException("NodeManager " + index + " failed to start"); } super.serviceStart(); }
private void initAndStartNodeManager(Configuration conf, boolean hasToReboot) { try { // Remove the old hook if we are rebooting. if (hasToReboot && null != nodeManagerShutdownHook) { ShutdownHookManager.get().removeShutdownHook(nodeManagerShutdownHook); } nodeManagerShutdownHook = new CompositeServiceShutdownHook(this); ShutdownHookManager.get().addShutdownHook(nodeManagerShutdownHook, SHUTDOWN_HOOK_PRIORITY); // System exit should be called only when NodeManager is instantiated from // main() funtion this.shouldExitOnShutdownEvent = true; this.init(conf); this.start(); } catch (Throwable t) { LOG.fatal("Error starting NodeManager", t); System.exit(-1); } }
private void initAndStartNodeManager(Configuration conf, boolean hasToReboot) { try { // Failed to start if we're a Unix based system but we don't have bash. // Bash is necessary to launch containers under Unix-based systems. if (!Shell.WINDOWS) { if (!Shell.checkIsBashSupported()) { String message = "Failing NodeManager start since we're on a " + "Unix-based system but bash doesn't seem to be available."; LOG.error(message); throw new YarnRuntimeException(message); } } // Remove the old hook if we are rebooting. if (hasToReboot && null != nodeManagerShutdownHook) { ShutdownHookManager.get().removeShutdownHook(nodeManagerShutdownHook); } nodeManagerShutdownHook = new CompositeServiceShutdownHook(this); ShutdownHookManager.get().addShutdownHook(nodeManagerShutdownHook, SHUTDOWN_HOOK_PRIORITY); // System exit should be called only when NodeManager is instantiated from // main() funtion this.shouldExitOnShutdownEvent = true; this.init(conf); this.start(); } catch (Throwable t) { LOG.error("Error starting NodeManager", t); System.exit(-1); } }
private void initAndStartNodeManager(Configuration conf, boolean hasToReboot) { try { // Failed to start if we're a Unix based system but we don't have bash. // Bash is necessary to launch containers under Unix-based systems. if (!Shell.WINDOWS) { if (!Shell.checkIsBashSupported()) { String message = "Failing NodeManager start since we're on a " + "Unix-based system but bash doesn't seem to be available."; LOG.fatal(message); throw new YarnRuntimeException(message); } } // Remove the old hook if we are rebooting. if (hasToReboot && null != nodeManagerShutdownHook) { ShutdownHookManager.get().removeShutdownHook(nodeManagerShutdownHook); } nodeManagerShutdownHook = new CompositeServiceShutdownHook(this); ShutdownHookManager.get().addShutdownHook(nodeManagerShutdownHook, SHUTDOWN_HOOK_PRIORITY); // System exit should be called only when NodeManager is instantiated from // main() funtion this.shouldExitOnShutdownEvent = true; this.init(conf); this.start(); } catch (Throwable t) { LOG.fatal("Error starting NodeManager", t); System.exit(-1); } }