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

Improve MoveCostFunction in StochasticLoadBalancer

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.98.15
    • Fix Version/s: 1.3.0, 0.98.16, 2.0.0
    • Component/s: Balancer
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The code in MoveCoseFunction:

      return scale(0, cluster.numRegions + META_MOVE_COST_MULT, moveCost);
      

      It uses cluster.numRegions + META_MOVE_COST_MULT as the max value when scale moveCost to [0,1]. But this should use maxMoves as the max value when cluster have a lot of regions.

      Assume a cluster have 10000 regions, maxMoves is 2500, it only scale moveCost to [0, 0.25].

      Improve moveCost by use Math.min(cluster.numRegions, maxMoves) as the max cost, so it can scale moveCost to [0,1].

      return scale(0, Math.min(cluster.numRegions, maxMoves) + META_MOVE_COST_MULT, moveCost);
      

        Attachments

        1. HBASE-14604_98_with_ut.diff
          4 kB
          Guanghao Zhang
        2. HBASE-14604_98.diff
          0.8 kB
          Guanghao Zhang
        3. HBASE-14604-0.98_v1.patch
          4 kB
          Guanghao Zhang
        4. HBASE-14604-0.98.patch
          4 kB
          Guanghao Zhang
        5. HBASE-14604-trunk_v1.patch
          4 kB
          Guanghao Zhang
        6. HBASE-14604-trunk.patch
          4 kB
          Guanghao Zhang

          Activity

            People

            • Assignee:
              zghao Guanghao Zhang
              Reporter:
              zghao Guanghao Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: