HBASE-8396 balancerSwitch making two zookeeper calls everytime(Rajeshbabu)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1471460 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
anoopsamjohn 2013-04-24 15:08:56 +00:00
parent 846acf6258
commit 100cf35f5d
1 changed files with 2 additions and 2 deletions

View File

@ -64,9 +64,9 @@ public class LoadBalancerTracker extends ZooKeeperNodeTracker {
public void setBalancerOn(boolean balancerOn) throws KeeperException {
byte [] upData = toByteArray(balancerOn);
try {
ZKUtil.createAndWatch(watcher, watcher.balancerZNode, upData);
} catch(KeeperException.NodeExistsException nee) {
ZKUtil.setData(watcher, watcher.balancerZNode, upData);
} catch(KeeperException.NoNodeException nne) {
ZKUtil.createAndWatch(watcher, watcher.balancerZNode, upData);
}
super.nodeDataChanged(watcher.balancerZNode);
}