hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject git commit: YARN-2721. Suppress NodeExist exception thrown by ZKRMStateStore when it retries creating znode. Contributed by Jian He.
Date Wed, 22 Oct 2014 04:52:47 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 77dc9afe8 -> 4b9de2cdf


YARN-2721. Suppress NodeExist exception thrown by ZKRMStateStore when it retries creating
znode. Contributed by Jian He.

(cherry picked from commit 7e3b5e6f5cb4945b4fab27e8a83d04280df50e17)


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

Branch: refs/heads/branch-2
Commit: 4b9de2cdfe4f9b4861fb67e0c0c72a4029fc7476
Parents: 77dc9af
Author: Zhijie Shen <zjshen@apache.org>
Authored: Tue Oct 21 21:49:17 2014 -0700
Committer: Zhijie Shen <zjshen@apache.org>
Committed: Tue Oct 21 21:52:01 2014 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                                  | 3 +++
 .../yarn/server/resourcemanager/recovery/ZKRMStateStore.java     | 4 ++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/4b9de2cd/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index be3ca2b..01e1483 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -687,6 +687,9 @@ Release 2.6.0 - UNRELEASED
     YARN-2720. Windows: Wildcard classpath variables not expanded against
     resources contained in archives. (Craig Welch via cnauroth)
 
+    YARN-2721. Suppress NodeExist exception thrown by ZKRMStateStore when it
+    retries creating znode. (Jian He via zjshen)
+
 Release 2.5.1 - 2014-09-05
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4b9de2cd/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/ZKRMStateStore.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/ZKRMStateStore.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/ZKRMStateStore.java
index 87c8cbe..fdbf125 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/ZKRMStateStore.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/ZKRMStateStore.java
@@ -1094,6 +1094,10 @@ public class ZKRMStateStore extends RMStateStore {
             throw new StoreFencedException();
           }
         } catch (KeeperException ke) {
+          if (ke.code() == Code.NODEEXISTS) {
+            LOG.info("znode already exists!");
+            return null;
+          }
           LOG.info("Exception while executing a ZK operation.", ke);
           if (shouldRetry(ke.code()) && ++retry < numRetries) {
             LOG.info("Retrying operation on ZK. Retry no. " + retry);


Mime
View raw message