You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2022/05/21 16:47:48 UTC

[hbase] branch branch-2.5 updated: HBASE-27054 TestStochasticLoadBalancerRegionReplicaLargeCluster.testRegionReplicasOnLargeCluster is flaky (#4454)

This is an automated email from the ASF dual-hosted git repository.

apurtell pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.5 by this push:
     new 188dfeec5f3 HBASE-27054 TestStochasticLoadBalancerRegionReplicaLargeCluster.testRegionReplicasOnLargeCluster is flaky (#4454)
188dfeec5f3 is described below

commit 188dfeec5f35f47c1a672def55939be4ae8e2ba7
Author: d-c-manning <67...@users.noreply.github.com>
AuthorDate: Sat May 21 09:17:04 2022 -0700

    HBASE-27054 TestStochasticLoadBalancerRegionReplicaLargeCluster.testRegionReplicasOnLargeCluster is flaky (#4454)
    
    Signed-off-by: Andrew Purtell <ap...@apache.org>
    
    Conflicts:
            hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerRegionReplicaLargeCluster.java
---
 .../TestStochasticLoadBalancerRegionReplicaLargeCluster.java      | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerRegionReplicaLargeCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerRegionReplicaLargeCluster.java
index 0dc0efc4a2c..d60ac903f6e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerRegionReplicaLargeCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestStochasticLoadBalancerRegionReplicaLargeCluster.java
@@ -25,7 +25,7 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 @Category({ MasterTests.class, LargeTests.class })
-public class TestStochasticLoadBalancerRegionReplicaLargeCluster extends BalancerTestBase2 {
+public class TestStochasticLoadBalancerRegionReplicaLargeCluster extends BalancerTestBase {
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
@@ -33,6 +33,12 @@ public class TestStochasticLoadBalancerRegionReplicaLargeCluster extends Balance
 
   @Test
   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 numRegions = 20 * numNodes; // 20 * replication regions per RS
     int numRegionsPerServer = 19; // all servers except one