hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jia...@apache.org
Subject hadoop git commit: YARN-2725. Added test cases of retrying creating znode in ZKRMStateStore. Contributed by Tsuyoshi Ozawa
Date Mon, 04 May 2015 23:16:49 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 71f4de220 -> d701acc9c


YARN-2725. Added test cases of retrying creating znode in ZKRMStateStore. Contributed by Tsuyoshi
Ozawa


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

Branch: refs/heads/trunk
Commit: d701acc9c67adc578ba18035edde1166eedaae98
Parents: 71f4de2
Author: Jian He <jianhe@apache.org>
Authored: Mon May 4 16:13:29 2015 -0700
Committer: Jian He <jianhe@apache.org>
Committed: Mon May 4 16:13:29 2015 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                          |  3 +++
 .../server/resourcemanager/recovery/ZKRMStateStore.java  |  2 +-
 .../resourcemanager/recovery/TestZKRMStateStore.java     | 11 +++++++++++
 3 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d701acc9/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 09ec41a..287205d 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -302,6 +302,9 @@ Release 2.8.0 - UNRELEASED
     YARN-3375. NodeHealthScriptRunner.shouldRun() check is performing 3 times for 
     starting NodeHealthScriptRunner. (Devaraj K via wangda)
 
+    YARN-2725. Added test cases of retrying creating znode in ZKRMStateStore.
+    (Tsuyoshi Ozawa via jianhe)
+
 Release 2.7.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d701acc9/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 9da6400..97dd029 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
@@ -297,7 +297,7 @@ public class ZKRMStateStore extends RMStateStore {
     createRootDir(amrmTokenSecretManagerRoot);
   }
 
-  private void createRootDir(final String rootPath) throws Exception {
+  protected void createRootDir(final String rootPath) throws Exception {
     // For root dirs, we shouldn't use the doMulti helper methods
     new ZKAction<String>() {
       @Override

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d701acc9/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/TestZKRMStateStore.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/TestZKRMStateStore.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/TestZKRMStateStore.java
index 6b09d39..c632a06 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/TestZKRMStateStore.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/TestZKRMStateStore.java
@@ -100,6 +100,15 @@ public class TestZKRMStateStore extends RMStateStoreTestBase {
         return workingZnode + "/" + ROOT_ZNODE_NAME + "/" + RM_APP_ROOT + "/"
             + appId;
       }
+
+      /**
+       * Emulating retrying createRootDir not to raise NodeExist exception
+       * @throws Exception
+       */
+      public void testRetryingCreateRootDir() throws Exception {
+        createRootDir(znodeWorkingPath);
+      }
+
     }
 
     public RMStateStore getRMStateStore() throws Exception {
@@ -148,6 +157,8 @@ public class TestZKRMStateStore extends RMStateStoreTestBase {
     testDeleteStore(zkTester);
     testRemoveApplication(zkTester);
     testAMRMTokenSecretManagerStateStore(zkTester);
+    ((TestZKRMStateStoreTester.TestZKRMStateStoreInternal)
+        zkTester.getRMStateStore()).testRetryingCreateRootDir();
   }
 
   @Test (timeout = 60000)


Mime
View raw message