YARN-2725. Added test cases of retrying creating znode in ZKRMStateStore. Contributed by Tsuyoshi Ozawa
This commit is contained in:
parent
71f4de220c
commit
d701acc9c6
|
@ -302,6 +302,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
YARN-3375. NodeHealthScriptRunner.shouldRun() check is performing 3 times for
|
YARN-3375. NodeHealthScriptRunner.shouldRun() check is performing 3 times for
|
||||||
starting NodeHealthScriptRunner. (Devaraj K via wangda)
|
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
|
Release 2.7.1 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -297,7 +297,7 @@ public class ZKRMStateStore extends RMStateStore {
|
||||||
createRootDir(amrmTokenSecretManagerRoot);
|
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
|
// For root dirs, we shouldn't use the doMulti helper methods
|
||||||
new ZKAction<String>() {
|
new ZKAction<String>() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -100,6 +100,15 @@ public class TestZKRMStateStore extends RMStateStoreTestBase {
|
||||||
return workingZnode + "/" + ROOT_ZNODE_NAME + "/" + RM_APP_ROOT + "/"
|
return workingZnode + "/" + ROOT_ZNODE_NAME + "/" + RM_APP_ROOT + "/"
|
||||||
+ appId;
|
+ appId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emulating retrying createRootDir not to raise NodeExist exception
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void testRetryingCreateRootDir() throws Exception {
|
||||||
|
createRootDir(znodeWorkingPath);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public RMStateStore getRMStateStore() throws Exception {
|
public RMStateStore getRMStateStore() throws Exception {
|
||||||
|
@ -148,6 +157,8 @@ public class TestZKRMStateStore extends RMStateStoreTestBase {
|
||||||
testDeleteStore(zkTester);
|
testDeleteStore(zkTester);
|
||||||
testRemoveApplication(zkTester);
|
testRemoveApplication(zkTester);
|
||||||
testAMRMTokenSecretManagerStateStore(zkTester);
|
testAMRMTokenSecretManagerStateStore(zkTester);
|
||||||
|
((TestZKRMStateStoreTester.TestZKRMStateStoreInternal)
|
||||||
|
zkTester.getRMStateStore()).testRetryingCreateRootDir();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test (timeout = 60000)
|
@Test (timeout = 60000)
|
||||||
|
|
Loading…
Reference in New Issue