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.
|
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,21 +279,22 @@ 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);
|
||||||
}
|
|
||||||
}.runWithRetries();
|
|
||||||
} catch (KeeperException ke) {
|
} catch (KeeperException ke) {
|
||||||
if (ke.code() == Code.NODEEXISTS) {
|
if (ke.code() == Code.NODEEXISTS) {
|
||||||
LOG.debug(rootPath + "znode already exists!");
|
LOG.debug(rootPath + "znode already exists!");
|
||||||
|
return null;
|
||||||
} else {
|
} else {
|
||||||
throw ke;
|
throw ke;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}.runWithRetries();
|
||||||
|
}
|
||||||
|
|
||||||
private void logRootNodeAcls(String prefix) throws Exception {
|
private void logRootNodeAcls(String prefix) throws Exception {
|
||||||
Stat getStat = new Stat();
|
Stat getStat = new Stat();
|
||||||
|
|
Loading…
Reference in New Issue