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:54 -08:00
parent 5a0020e867
commit 0553290c6a
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);
}