[ 
https://issues.apache.org/jira/browse/HBASE-10761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13935972#comment-13935972
 ] 

stack commented on HBASE-10761:
-------------------------------

Rather than duplicate this code from baseloadbalancer, maybe break it out into 
a method in baseloadbalancer and then call it from the subclass?

+    if (cs.getNumServers() < MIN_SERVER_BALANCE) {
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Not running balancer because only " + cs.getNumServers()
+            + " active regionserver(s)");
+      }
+      return false;
+    }

Now the balancer will always run.  Is that what is wanted?

Thanks for looking into this Victor.  You have a point.

> StochasticLoadBalancer still uses SimpleLoadBalancer's needBalance logic
> ------------------------------------------------------------------------
>
>                 Key: HBASE-10761
>                 URL: https://issues.apache.org/jira/browse/HBASE-10761
>             Project: HBase
>          Issue Type: Bug
>          Components: Balancer
>    Affects Versions: 0.98.0
>            Reporter: Victor Xu
>         Attachments: HBASE_10761.patch
>
>
> StochasticLoadBalancer has become the default balancer since 0.98.0. But its 
> balanceCluster method still uses the BaseLoadBalancer.needBalance() which is 
> originally designed for SimpleLoadBalancer. It's all based on the number of 
> regions on the regionservers.
> This can cause such a problem: when the cluster has some Hot Spot Region, the 
> balance process may not be triggered because the numbers of regions on the 
> RegionServers are averaged.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to