hbase-issues mailing list archives

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

     [ https://issues.apache.org/jira/browse/HBASE-8396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

rajeshbabu updated HBASE-8396:
------------------------------

    Status: Patch Available  (was: Open)
    
> 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
>
>         Attachments: HBASE-8396.patch
>
>
> 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).
> {code}
>     try {
>       ZKUtil.createAndWatch(watcher, watcher.balancerZNode, upData);
>     } catch(KeeperException.NodeExistsException nee) {
>       ZKUtil.setData(watcher, watcher.balancerZNode, upData);
>     }
> {code}
> We can change as below to avoid extra zk call from second time onwards.
> {code}
>     try {
>       ZKUtil.setData(watcher, watcher.balancerZNode, upData);
>     } catch(KeeperException.NoNodeException nne) {
>       ZKUtil.createAndWatch(watcher, watcher.balancerZNode, upData);
>     }
> {code}

--
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

Mime
View raw message