HBASE-17565 StochasticLoadBalancer may incorrectly skip balancing due to skewed multiplier sum - addendum resets min cost
This commit is contained in:
parent
5a0020e867
commit
0553290c6a
|
@ -96,6 +96,7 @@ public class TestStochasticLoadBalancer extends BalancerTestBase {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testNeedBalance() {
|
public void testNeedBalance() {
|
||||||
|
float minCost = conf.getFloat("hbase.master.balancer.stochastic.minCostNeedBalance", 0.05f);
|
||||||
conf.setFloat("hbase.master.balancer.stochastic.minCostNeedBalance", 1.0f);
|
conf.setFloat("hbase.master.balancer.stochastic.minCostNeedBalance", 1.0f);
|
||||||
loadBalancer.setConf(conf);
|
loadBalancer.setConf(conf);
|
||||||
for (int[] mockCluster : clusterStateMocks) {
|
for (int[] mockCluster : clusterStateMocks) {
|
||||||
|
@ -104,6 +105,7 @@ public class TestStochasticLoadBalancer extends BalancerTestBase {
|
||||||
assertNull(plans);
|
assertNull(plans);
|
||||||
}
|
}
|
||||||
// reset config
|
// reset config
|
||||||
|
conf.setFloat("hbase.master.balancer.stochastic.minCostNeedBalance", minCost);
|
||||||
loadBalancer.setConf(conf);
|
loadBalancer.setConf(conf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue