HBASE-17565 StochasticLoadBalancer may incorrectly skip balancing due to skewed multiplier sum - addendum resets min cost

This commit is contained in:
tedyu 2017-02-07 12:24:20 -08:00
parent 6c5eec249c
commit d0498d979c
1 changed files with 2 additions and 0 deletions

View File

@ -96,6 +96,7 @@ public class TestStochasticLoadBalancer extends BalancerTestBase {
@Test
public void testNeedBalance() {
float minCost = conf.getFloat("hbase.master.balancer.stochastic.minCostNeedBalance", 0.05f);
conf.setFloat("hbase.master.balancer.stochastic.minCostNeedBalance", 1.0f);
loadBalancer.setConf(conf);
for (int[] mockCluster : clusterStateMocks) {
@ -104,6 +105,7 @@ public class TestStochasticLoadBalancer extends BalancerTestBase {
assertNull(plans);
}
// reset config
conf.setFloat("hbase.master.balancer.stochastic.minCostNeedBalance", minCost);
loadBalancer.setConf(conf);
}