[
https://issues.apache.org/jira/browse/HBASE-14604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14962978#comment-14962978
]
Guanghao Zhang commented on HBASE-14604:
----------------------------------------
Add ut for MoveCostFunction.
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.hadoop.hbase.master.TestMasterFailoverBalancerPersistence
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.08 sec - in
org.apache.hadoop.hbase.master.TestMasterFailoverBalancerPersistence
Running org.apache.hadoop.hbase.master.balancer.TestDefaultLoadBalancer
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.812 sec - in
org.apache.hadoop.hbase.master.balancer.TestDefaultLoadBalancer
Running org.apache.hadoop.hbase.master.balancer.TestStochasticLoadBalancer
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 28.241 sec -
in org.apache.hadoop.hbase.master.balancer.TestStochasticLoadBalancer
Running org.apache.hadoop.hbase.master.balancer.TestBaseLoadBalancer
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.601 sec - in
org.apache.hadoop.hbase.master.balancer.TestBaseLoadBalancer
Results :
Tests run: 21, Failures: 0, Errors: 0, Skipped: 0
> Improve MoveCostFunction in StochasticLoadBalancer
> --------------------------------------------------
>
> Key: HBASE-14604
> URL: https://issues.apache.org/jira/browse/HBASE-14604
> Project: HBase
> Issue Type: Bug
> Components: Balancer
> Reporter: Guanghao Zhang
> Assignee: Guanghao Zhang
> Attachments: HBASE-14604_98.diff, HBASE-14604_98_with_ut.diff
>
>
> The code in MoveCoseFunction:
> {code}
> return scale(0, cluster.numRegions + META_MOVE_COST_MULT, moveCost);
> {code}
> 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 maxMoves.
> {code}
> return scale(0, Math.min(cluster.numRegions, maxMoves) + META_MOVE_COST_MULT,
> moveCost);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)