hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject [2/2] hadoop git commit: YARN-3457. NPE when NodeManager.serviceInit fails and stopRecoveryStore called. Contributed by Bibin A Chundatt.
Date Wed, 13 May 2015 20:50:41 GMT
YARN-3457. NPE when NodeManager.serviceInit fails and stopRecoveryStore called. Contributed
by Bibin A Chundatt.

(cherry picked from commit ac32fa187cf37e5a51fd579e052105662ab3c411)

Conflicts:

	hadoop-yarn-project/CHANGES.txt


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/bfd28d6f
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/bfd28d6f
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/bfd28d6f

Branch: refs/heads/branch-2.7
Commit: bfd28d6f7e3a348ddb31a0e2905005b5bdb3aa27
Parents: 9527cdd
Author: Jason Lowe <jlowe@apache.org>
Authored: Wed May 13 19:19:02 2015 +0000
Committer: Jason Lowe <jlowe@apache.org>
Committed: Wed May 13 20:38:52 2015 +0000

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                 |  3 +++
 .../yarn/server/nodemanager/NodeManager.java    | 22 +++++++++++---------
 2 files changed, 15 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/bfd28d6f/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 79ad16f..8f2a85e 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -86,6 +86,9 @@ Release 2.7.1 - UNRELEASED
     YARN-3626. On Windows localized resources are not moved to the front
     of the classpath when they should be. (Craig Welch via xgong)
 
+    YARN-3457. NPE when NodeManager.serviceInit fails and stopRecoveryStore called.
+    (Bibin A Chundatt via ozawa)
+
 Release 2.7.0 - 2015-04-20
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/bfd28d6f/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java
----------------------------------------------------------------------
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 016447c..2abf62b 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
@@ -159,16 +159,18 @@ public class NodeManager extends CompositeService
 
   private void stopRecoveryStore() throws IOException {
     nmStore.stop();
-    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 != 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);
+        }
       }
     }
   }


Mime
View raw message