Class TestSimpleLoadBalancer
java.lang.Object
org.apache.hadoop.hbase.master.balancer.BalancerTestBase
org.apache.hadoop.hbase.master.balancer.TestSimpleLoadBalancer
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
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static org.apache.hadoop.hbase.master.balancer.SimpleLoadBalancer
private static final org.slf4j.Logger
(package private) int[]
org.junit.rules.TestName
Fields inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
clusterStateMocks, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, conf, largeCluster, regionId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
void
Test the load balancing algorithm.void
void
Test the load balancing algorithm.private void
testImpactOfBalanceClusterOverall
(boolean useLoadOfAllTable) void
Methods 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
-
CLASS_RULE
-
LOG
-
loadBalancer
-
mockUniformCluster
int[] mockUniformCluster -
name
-
-
Constructor Details
-
TestSimpleLoadBalancer
public TestSimpleLoadBalancer()
-
-
Method Details
-
beforeAllTests
- Throws:
Exception
-
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
-