Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16958

Balancer recomputes block distributions every time balanceCluster() runs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Balancer
    • None

    Description

      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:

              regionLocationFutures.set(regionIndex,
                  regionFinder.asyncGetBlockDistribution(region));
      

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ghelmling Gary Helmling
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: