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/trunk@1607473 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
297e3c72fb
commit
447c1c233b
@ -215,6 +215,9 @@ Release 2.5.0 - UNRELEASED
|
||||
TestContainersMonitor#testContainerKillOnMemoryOverflow.
|
||||
(Anubhav Dhoot via kasha)
|
||||
|
||||
YARN-2241. ZKRMStateStore: On startup, show nicer messages if znodes already
|
||||
exist. (Robert Kanter via kasha)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
BUG FIXES
|
||||
|
@ -279,20 +279,21 @@ public synchronized void startInternal() throws Exception {
|
||||
|
||||
private void createRootDir(final String rootPath) throws Exception {
|
||||
// For root dirs, we shouldn't use the doMulti helper methods
|
||||
try {
|
||||
new ZKAction<String>() {
|
||||
@Override
|
||||
public String run() throws KeeperException, InterruptedException {
|
||||
new ZKAction<String>() {
|
||||
@Override
|
||||
public String run() throws KeeperException, InterruptedException {
|
||||
try {
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user