diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 9754c33acf4..001396fa80b 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -290,6 +290,9 @@ Release 2.7.1 - UNRELEASED YARN-3522. Fixed DistributedShell to instantiate TimeLineClient as the correct user. (Zhijie Shen via jianhe) + YARN-3537. NPE when NodeManager.serviceInit fails and stopRecoveryStore + invoked (Brahma Reddy Battula via jlowe) + Release 2.7.0 - 2015-04-20 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java index 4a28c6f07c4..6718b53f7b7 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java @@ -178,18 +178,20 @@ public class NodeManager extends CompositeService } private void stopRecoveryStore() throws IOException { - 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); + 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); + } } } }