From 0dab826f1988e6aa1063c518bba702d5d4178d22 Mon Sep 17 00:00:00 2001 From: gchanan Date: Fri, 14 Sep 2012 22:36:03 +0000 Subject: [PATCH] HBASE-6260 ADDENDUM (fix test failure plus comment fixups) git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1384954 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java index e76d6903a0e..bd15540eb72 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/LoadBalancerTracker.java @@ -30,7 +30,7 @@ import org.apache.zookeeper.KeeperException; import com.google.protobuf.InvalidProtocolBufferException; /** - * Tracks the load balancer switch up in ZK + * Tracks the load balancer state up in ZK */ @InterfaceAudience.Private public class LoadBalancerTracker extends ZooKeeperNodeTracker { @@ -47,7 +47,7 @@ public class LoadBalancerTracker extends ZooKeeperNodeTracker { public boolean isBalancerOn() { byte [] upData = super.getData(false); try { - // is data in ZK is null, use default of on. + // if data in ZK is null, use default of on. return upData == null || parseFrom(upData).getBalancerOn(); } catch (DeserializationException dex) { LOG.error("ZK state for LoadBalancer could not be parsed " + Bytes.toStringBinary(upData)); @@ -68,6 +68,7 @@ public class LoadBalancerTracker extends ZooKeeperNodeTracker { } catch(KeeperException.NodeExistsException nee) { ZKUtil.setData(watcher, watcher.balancerZNode, upData); } + super.nodeDataChanged(watcher.balancerZNode); } private byte [] toByteArray(boolean isBalancerOn) {