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
|
||||
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
|
||||
|
@ -297,7 +297,7 @@ public synchronized void startInternal() throws Exception {
|
||||
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
|
||||
|
@ -100,6 +100,15 @@ public String getAppNode(String appId) {
|
||||
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 void testZKRMStateStoreRealZK() throws Exception {
|
||||
testDeleteStore(zkTester);
|
||||
testRemoveApplication(zkTester);
|
||||
testAMRMTokenSecretManagerStateStore(zkTester);
|
||||
((TestZKRMStateStoreTester.TestZKRMStateStoreInternal)
|
||||
zkTester.getRMStateStore()).testRetryingCreateRootDir();
|
||||
}
|
||||
|
||||
@Test (timeout = 60000)
|
||||
|
Loading…
Reference in New Issue
Block a user