You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Gary Helmling (JIRA)" <ji...@apache.org> on 2016/10/27 20:49:59 UTC

[jira] [Created] (HBASE-16958) Balancer recomputes block distributions every time balanceCluster() runs

Gary Helmling created HBASE-16958:
-------------------------------------

             Summary: Balancer recomputes block distributions every time balanceCluster() runs
                 Key: HBASE-16958
                 URL: https://issues.apache.org/jira/browse/HBASE-16958
             Project: HBase
          Issue Type: Bug
          Components: Balancer
            Reporter: Gary Helmling
            Assignee: Gary Helmling
             Fix For: 1.3.0


The change in HBASE-16570 modified the balancer to compute block distributions in parallel with a pool of 5 threads.  However, because it does this every time Cluster is instantiated, it effectively bypasses the cache of block locations added in HBASE-14473:

In the LoadBalancer.balanceCluster() implementations (in StochasticLoadBalancer, SimpleLoadBalancer), we create a new Cluster instance.

In Cluster.<init>, we call registerRegion() on every HRegionInfo.

In registerRegion(), we do the following:
{code}
        regionLocationFutures.set(regionIndex,
            regionFinder.asyncGetBlockDistribution(region));
{code}

Then, back in Cluster.<init> we do a get() on each ListenableFuture in a loop.

So while we are doing the calls to get block locations in parallel with 5 threads, we're recomputing them every time balanceCluster() is called and not taking advantage of the cache at all.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)