private void stopRecoveryStore() throws IOException { if (null != nmStore) { nmStore.stop(); if (null != context) { if (context.getDecommissioned() && nmStore.canRecover()) { LOG.info("Removing state store due to decommission"); Configuration conf = getConfig(); Path recoveryRoot = new Path(conf.get(YarnConfiguration.NM_RECOVERY_DIR)); LOG.info("Removing state store at " + recoveryRoot + " due to decommission"); FileSystem recoveryFs = FileSystem.getLocal(conf); if (!recoveryFs.delete(recoveryRoot, true)) { LOG.warn("Unable to delete " + recoveryRoot); } } } } }
private void stopRecoveryStore() throws IOException { if (null != nmStore) { nmStore.stop(); if (null != context) { if (context.getDecommissioned() && nmStore.canRecover()) { LOG.info("Removing state store due to decommission"); Configuration conf = getConfig(); Path recoveryRoot = new Path(conf.get(YarnConfiguration.NM_RECOVERY_DIR)); LOG.info("Removing state store at " + recoveryRoot + " due to decommission"); FileSystem recoveryFs = FileSystem.getLocal(conf); if (!recoveryFs.delete(recoveryRoot, true)) { LOG.warn("Unable to delete " + recoveryRoot); } } } } }
private void stopRecoveryStore() throws IOException { if (null != nmStore) { nmStore.stop(); if (null != context) { if (context.getDecommissioned() && nmStore.canRecover()) { LOG.info("Removing state store due to decommission"); Configuration conf = getConfig(); Path recoveryRoot = new Path(conf.get(YarnConfiguration.NM_RECOVERY_DIR)); LOG.info("Removing state store at " + recoveryRoot + " due to decommission"); FileSystem recoveryFs = FileSystem.getLocal(conf); if (!recoveryFs.delete(recoveryRoot, true)) { LOG.warn("Unable to delete " + recoveryRoot); } } } } }
private void stopRecoveryStore() throws IOException { if (null != nmStore) { nmStore.stop(); if (null != context) { if (context.getDecommissioned() && nmStore.canRecover()) { LOG.info("Removing state store due to decommission"); Configuration conf = getConfig(); Path recoveryRoot = new Path(conf.get(YarnConfiguration.NM_RECOVERY_DIR)); LOG.info("Removing state store at " + recoveryRoot + " due to decommission"); FileSystem recoveryFs = FileSystem.getLocal(conf); if (!recoveryFs.delete(recoveryRoot, true)) { LOG.warn("Unable to delete " + recoveryRoot); } } } } }
&& !context.getDecommissioned() && supervised;
&& !this.context.getDecommissioned()) {
&& !this.context.getDecommissioned()) {
&& !this.context.getDecommissioned()) { if (getConfig().getBoolean(YarnConfiguration.NM_RECOVERY_SUPERVISED, YarnConfiguration.DEFAULT_NM_RECOVERY_SUPERVISED)) {
&& !context.getDecommissioned() && supervised;
&& !this.context.getDecommissioned()) { if (getConfig().getBoolean(YarnConfiguration.NM_RECOVERY_SUPERVISED, YarnConfiguration.DEFAULT_NM_RECOVERY_SUPERVISED)) {
@Override protected void serviceStop() throws Exception { // the isStopped check is for avoiding multiple unregistrations. synchronized(shutdownMonitor) { if (this.registeredWithRM && !this.isStopped && !isNMUnderSupervisionWithRecoveryEnabled() && !context.getDecommissioned() && !failedToConnect) { unRegisterNM(); } // Interrupt the updater. this.isStopped = true; stopRMProxy(); super.serviceStop(); } }
@Override protected void serviceStop() throws Exception { // the isStopped check is for avoiding multiple unregistrations. synchronized(shutdownMonitor) { if (this.registeredWithRM && !this.isStopped && !isNMUnderSupervisionWithRecoveryEnabled() && !context.getDecommissioned() && !failedToConnect) { unRegisterNM(); } // Interrupt the updater. this.isStopped = true; stopRMProxy(); super.serviceStop(); } }