HBASE-27054 TestStochasticLoadBalancerRegionReplicaLargeCluster.testRegionReplicasOnLargeCluster is flaky (#4454)

Signed-off-by: Andrew Purtell <apurtell@apache.org>

Conflicts:
	hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerRegionReplicaLargeCluster.java
This commit is contained in:
d-c-manning 2022-05-21 09:17:04 -07:00 committed by Andrew Purtell
parent d11298f404
commit 6ae8c9a808
1 changed files with 7 additions and 1 deletions

View File

@ -25,7 +25,7 @@ import org.junit.Test;
import org.junit.experimental.categories.Category; import org.junit.experimental.categories.Category;
@Category({ MasterTests.class, LargeTests.class }) @Category({ MasterTests.class, LargeTests.class })
public class TestStochasticLoadBalancerRegionReplicaLargeCluster extends BalancerTestBase2 { public class TestStochasticLoadBalancerRegionReplicaLargeCluster extends BalancerTestBase {
@ClassRule @ClassRule
public static final HBaseClassTestRule CLASS_RULE = public static final HBaseClassTestRule CLASS_RULE =
@ -33,6 +33,12 @@ public class TestStochasticLoadBalancerRegionReplicaLargeCluster extends Balance
@Test @Test
public void testRegionReplicasOnLargeCluster() { public void testRegionReplicasOnLargeCluster() {
// With default values for moveCost and tableSkewCost, the balancer makes much slower progress.
// Since we're only looking for balance in region counts and no colocated replicas, we can
// ignore these two cost functions to allow us to make any move that helps other functions.
conf.setFloat("hbase.master.balancer.stochastic.moveCost", 0f);
conf.setFloat("hbase.master.balancer.stochastic.tableSkewCost", 0f);
loadBalancer.onConfigurationChange(conf);
int numNodes = 1000; int numNodes = 1000;
int numRegions = 20 * numNodes; // 20 * replication regions per RS int numRegions = 20 * numNodes; // 20 * replication regions per RS
int numRegionsPerServer = 19; // all servers except one int numRegionsPerServer = 19; // all servers except one