hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsamj...@apache.org
Subject svn commit: r1471463 - /hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java
Date Wed, 24 Apr 2013 15:09:40 GMT
Author: anoopsamjohn
Date: Wed Apr 24 15:09:40 2013
New Revision: 1471463

URL: http://svn.apache.org/r1471463
Log:
HBASE-8396 balancerSwitch making two zookeeper calls everytime(Rajeshbabu)

Modified:
    hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java

Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java?rev=1471463&r1=1471462&r2=1471463&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java
(original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java
Wed Apr 24 15:09:40 2013
@@ -64,9 +64,9 @@ public class LoadBalancerTracker extends
   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);
   }



Mime
View raw message