Class TestSimpleLoadBalancer
java.lang.Object
org.apache.hadoop.hbase.master.balancer.BalancerTestBase
org.apache.hadoop.hbase.master.balancer.TestSimpleLoadBalancer
@Tag("org.apache.hadoop.hbase.testclassification.MasterTests") @Tag("org.apache.hadoop.hbase.testclassification.SmallTests")
public class TestSimpleLoadBalancer
extends BalancerTestBase
Test the load balancer that is created by default.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
BalancerTestBase.MockMapping -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static org.apache.hadoop.hbase.master.balancer.SimpleLoadBalancerprivate static final org.slf4j.Loggerprivate String(package private) int[]Fields inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
clusterStateMocks, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, conf, largeCluster, regionId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoidbeforeEach(org.junit.jupiter.api.TestInfo testInfo) voidTest the load balancing algorithm.voidvoidTest the load balancing algorithm.private voidtestImpactOfBalanceClusterOverall(boolean useLoadOfAllTable) voidMethods inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
assertClusterAsBalanced, assertClusterOverallAsBalanced, assertRegionReplicaPlacement, convertToList, createRegions, createServerMap, mockCluster, mockClusterServers, mockClusterServers, mockClusterServers, mockClusterServersUnsorted, mockClusterServersWithTables, mockUniformClusterServers, printMock, printStats, randomRegions, randomRegions, randomServer, randomServers, reconcile, returnRegions, returnServer, returnServers, uniformRegions, updateLoad
-
Field Details
-
LOG
-
loadBalancer
-
methodName
-
mockUniformCluster
int[] mockUniformCluster
-
-
Constructor Details
-
TestSimpleLoadBalancer
public TestSimpleLoadBalancer()
-
-
Method Details
-
beforeAllTests
- Throws:
Exception
-
beforeEach
-
testBalanceClusterOverall
Test the load balancing algorithm. Invariant is that all servers should be hosting either floor(average) or ceiling(average) at both table level and cluster level- Throws:
Exception
-
testImpactOfBalanceClusterOverall
Test the load balancing algorithm. Invariant is that all servers should be hosting either floor(average) or ceiling(average) at both table level and cluster level Deliberately generate a special case to show the overall strategy can achieve cluster level balance while the bytable strategy cannot- Throws:
Exception
-
testImpactOfBalanceClusterOverallWithLoadOfAllTable
- Throws:
Exception
-
testImpactOfBalanceClusterOverall
- Throws:
Exception
-
testBalanceClusterOverallStrictly
-