hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rajeshbabu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-8396) balancerSwitch making two zookeeper calls everytime.
Date Tue, 23 Apr 2013 06:01:21 GMT
rajeshbabu created HBASE-8396:

             Summary: balancerSwitch making two zookeeper calls everytime.
                 Key: HBASE-8396
                 URL: https://issues.apache.org/jira/browse/HBASE-8396
             Project: HBase
          Issue Type: Bug
          Components: Balancer
            Reporter: rajeshbabu
            Assignee: rajeshbabu
             Fix For: 0.98.0, 0.95.2

first time on balancerSwitch we will create balancerZnode.
from second time onwards we will try to create node(1st time) which will fail with NodeExistsException
then we will call setData(2nd time).
    try {
      ZKUtil.createAndWatch(watcher, watcher.balancerZNode, upData);
    } catch(KeeperException.NodeExistsException nee) {
      ZKUtil.setData(watcher, watcher.balancerZNode, upData);

We can change as below to avoid extra zk call from second time onwards.
    try {
      ZKUtil.setData(watcher, watcher.balancerZNode, upData);
    } catch(KeeperException.NoNodeException nne) {
      ZKUtil.createAndWatch(watcher, watcher.balancerZNode, upData);

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message