hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject hadoop git commit: YARN-3537. NPE when NodeManager.serviceInit fails and stopRecoveryStore invoked. Contributed by Brahma Reddy Battula (cherry picked from commit 5e093f0d400f82f67d9b2d24253c79e4a5abacf9)
Date Fri, 24 Apr 2015 22:04:18 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 73ba3ebe7 -> cf4154676


YARN-3537. NPE when NodeManager.serviceInit fails and stopRecoveryStore invoked. Contributed
by Brahma Reddy Battula
(cherry picked from commit 5e093f0d400f82f67d9b2d24253c79e4a5abacf9)


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

Branch: refs/heads/branch-2
Commit: cf4154676b892a36fe977c115bac52f9dabcc128
Parents: 73ba3eb
Author: Jason Lowe <jlowe@apache.org>
Authored: Fri Apr 24 22:02:53 2015 +0000
Committer: Jason Lowe <jlowe@apache.org>
Committed: Fri Apr 24 22:04:03 2015 +0000

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                 |  3 +++
 .../yarn/server/nodemanager/NodeManager.java    | 26 +++++++++++---------
 2 files changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/cf415467/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index ea8c723..e4bf630 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -245,6 +245,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

http://git-wip-us.apache.org/repos/asf/hadoop/blob/cf415467/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 90e903b..46d75af 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
@@ -177,18 +177,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);
+          }
         }
       }
     }


Mime
View raw message