hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rohithsharm...@apache.org
Subject hadoop git commit: YARN-4431. Not necessary to do unRegisterNM() if NM get stop due to failed to connect to RM. (Junpin Du via rohithsharmaks)
Date Wed, 09 Dec 2015 05:37:36 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 05a7fb3a9 -> 6a6bbc51c


YARN-4431. Not necessary to do unRegisterNM() if NM get stop due to failed to connect to RM.
(Junpin Du via rohithsharmaks)


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

Branch: refs/heads/branch-2.8
Commit: 6a6bbc51c43140e6919c26e32519af94469e191a
Parents: 05a7fb3
Author: rohithsharmaks <rohithsharmaks@apache.org>
Authored: Wed Dec 9 11:04:28 2015 +0530
Committer: rohithsharmaks <rohithsharmaks@apache.org>
Committed: Wed Dec 9 11:06:31 2015 +0530

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                                 | 3 +++
 .../hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java   | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6a6bbc51/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index ed31d08..0c920df 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -1031,6 +1031,9 @@ Release 2.8.0 - UNRELEASED
     YARN-4408. Fix issue that NodeManager reports negative running containers. 
     (Robert Kanter via junping_du)
 
+    YARN-4431. Not necessary to do unRegisterNM() if NM get stop due to failed to connect
+    to RM. (Junping Du via rohithsharmaks)
+
 Release 2.7.3 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6a6bbc51/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.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/NodeStatusUpdaterImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java
index 34267b3..ba915c2 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java
@@ -134,6 +134,7 @@ public class NodeStatusUpdaterImpl extends AbstractService implements
 
   private Runnable statusUpdaterRunnable;
   private Thread  statusUpdater;
+  private boolean failedToConnect = false;
   private long rmIdentifier = ResourceManagerConstants.RM_INVALID_IDENTIFIER;
   private boolean registeredWithRM = false;
   Set<ContainerId> pendingContainersToRemove = new HashSet<ContainerId>();
@@ -241,7 +242,7 @@ public class NodeStatusUpdaterImpl extends AbstractService implements
     // the isStopped check is for avoiding multiple unregistrations.
     if (this.registeredWithRM && !this.isStopped
         && !isNMUnderSupervisionWithRecoveryEnabled()
-        && !context.getDecommissioned()) {
+        && !context.getDecommissioned() && !failedToConnect) {
       unRegisterNM();
     }
     // Interrupt the updater.
@@ -823,6 +824,8 @@ public class NodeStatusUpdaterImpl extends AbstractService implements
             //catch and throw the exception if tried MAX wait time to connect RM
             dispatcher.getEventHandler().handle(
                 new NodeManagerEvent(NodeManagerEventType.SHUTDOWN));
+            // failed to connect to RM.
+            failedToConnect = true;
             throw new YarnRuntimeException(e);
           } catch (Throwable e) {
 


Mime
View raw message