hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject [15/47] hadoop git commit: YARN-3457. NPE when NodeManager.serviceInit fails and stopRecoveryStore called. Contributed by Bibin A Chundatt.
Date Fri, 10 Apr 2015 04:25:11 GMT
YARN-3457. NPE when NodeManager.serviceInit fails and stopRecoveryStore called. Contributed
by Bibin A Chundatt.


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

Branch: refs/heads/YARN-2928
Commit: 0a4a296dd6b7dc355d1c0aa1a56b53ba89cb3d17
Parents: fd77880
Author: Tsuyoshi Ozawa <ozawa@apache.org>
Authored: Wed Apr 8 15:56:18 2015 +0900
Committer: Zhijie Shen <zjshen@apache.org>
Committed: Thu Apr 9 20:55:58 2015 -0700

----------------------------------------------------------------------
 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/0a4a296d/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 3008d56..0d9c5ce 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -212,6 +212,9 @@ Release 2.8.0 - UNRELEASED
 
     YARN-3110. Few issues in ApplicationHistory web ui. (Naganarasimha G R via xgong)
 
+    YARN-3457. NPE when NodeManager.serviceInit fails and stopRecoveryStore called.
+    (Bibin A Chundatt via ozawa)
+
 Release 2.7.0 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/0a4a296d/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 d140d92..c5b8f3f 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
@@ -184,16 +184,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