YARN-2241. ZKRMStateStore: On startup, show nicer messages if znodes already exist. (Robert Kanter via kasha)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1607475 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a9cf4e7a98
commit
99bced167b
|
@ -193,6 +193,9 @@ Release 2.5.0 - UNRELEASED
|
||||||
TestContainersMonitor#testContainerKillOnMemoryOverflow.
|
TestContainersMonitor#testContainerKillOnMemoryOverflow.
|
||||||
(Anubhav Dhoot via kasha)
|
(Anubhav Dhoot via kasha)
|
||||||
|
|
||||||
|
YARN-2241. ZKRMStateStore: On startup, show nicer messages if znodes already
|
||||||
|
exist. (Robert Kanter via kasha)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -279,20 +279,21 @@ public class ZKRMStateStore extends RMStateStore {
|
||||||
|
|
||||||
private void createRootDir(final String rootPath) throws Exception {
|
private 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
|
||||||
try {
|
new ZKAction<String>() {
|
||||||
new ZKAction<String>() {
|
@Override
|
||||||
@Override
|
public String run() throws KeeperException, InterruptedException {
|
||||||
public String run() throws KeeperException, InterruptedException {
|
try {
|
||||||
return zkClient.create(rootPath, null, zkAcl, CreateMode.PERSISTENT);
|
return zkClient.create(rootPath, null, zkAcl, CreateMode.PERSISTENT);
|
||||||
|
} catch (KeeperException ke) {
|
||||||
|
if (ke.code() == Code.NODEEXISTS) {
|
||||||
|
LOG.debug(rootPath + "znode already exists!");
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
throw ke;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}.runWithRetries();
|
|
||||||
} catch (KeeperException ke) {
|
|
||||||
if (ke.code() == Code.NODEEXISTS) {
|
|
||||||
LOG.debug(rootPath + "znode already exists!");
|
|
||||||
} else {
|
|
||||||
throw ke;
|
|
||||||
}
|
}
|
||||||
}
|
}.runWithRetries();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void logRootNodeAcls(String prefix) throws Exception {
|
private void logRootNodeAcls(String prefix) throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue