Class TestRSGroupBasedLoadBalancer
java.lang.Object
org.apache.hadoop.hbase.master.balancer.BalancerTestBase
org.apache.hadoop.hbase.master.balancer.RSGroupableBalancerTestBase
org.apache.hadoop.hbase.master.balancer.TestRSGroupBasedLoadBalancer
Test RSGroupBasedLoadBalancer with SimpleLoadBalancer as internal balancer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
BalancerTestBase.MockMapping -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static org.apache.hadoop.hbase.rsgroup.RSGroupBasedLoadBalancerprivate static final org.slf4j.LoggerFields inherited from class org.apache.hadoop.hbase.master.balancer.RSGroupableBalancerTestBase
conf, groupMap, groups, regionAssignment, regionId, servers, table0, tableDescs, tablesFields inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
clusterStateMocks, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, largeCluster -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoidTest the load balancing algorithm.voidTests the bulk assignment used during cluster startup.voidvoidTest the cluster startup bulk assignment which attempts to retain assignment info.voidTest BOGUS_SERVER_NAME among groups do not overwrite each other.Methods inherited from class org.apache.hadoop.hbase.master.balancer.RSGroupableBalancerTestBase
assertClusterAsBalanced, assertImmediateAssignment, assertRetainedAssignment, assignedRegions, constructGroupInfo, constructTableDesc, convertToGroupBasedMap, generateServers, getMockedGroupInfoManager, getMockedMaster, getTableName, mockClusterServers, printStats, randomRegions, reconcile, updateLoadMethods 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, randomServer, randomServers, reconcile, returnRegions, returnServer, returnServers, uniformRegions, updateLoad
-
Field Details
-
CLASS_RULE
-
LOG
-
loadBalancer
-
-
Constructor Details
-
TestRSGroupBasedLoadBalancer
public TestRSGroupBasedLoadBalancer()
-
-
Method Details
-
beforeAllTests
- Throws:
Exception
-
testBalanceCluster
Test the load balancing algorithm. Invariant is that all servers of the group should be hosting either floor(average) or ceiling(average)- Throws:
Exception
-
testBulkAssignment
Tests the bulk assignment used during cluster startup. Round-robin. Should yield a balanced cluster so same invariant as the load balancer holds, all servers holding either floor(avg) or ceiling(avg).- Throws:
Exception
-
testRetainAssignment
Test the cluster startup bulk assignment which attempts to retain assignment info.- Throws:
Exception
-
testRoundRobinAssignment
Test BOGUS_SERVER_NAME among groups do not overwrite each other.- Throws:
Exception
-
testOnConfigurationChange
-