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
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static org.apache.hadoop.hbase.rsgroup.RSGroupBasedLoadBalancer
private static final org.slf4j.Logger
Fields inherited from class org.apache.hadoop.hbase.master.balancer.RSGroupableBalancerTestBase
conf, groupMap, groups, regionAssignment, regionId, servers, table0, tableDescs, tableMap, tables
Fields inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
clusterStateMocks, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, dummyMetricsStochasticBalancer, largeCluster
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
void
Test the load balancing algorithm.void
Tests the bulk assignment used during cluster startup.void
void
Test the cluster startup bulk assignment which attempts to retain assignment info.void
Test 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, updateLoad
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, randomServer, randomServers, reconcile, returnRegions, returnServer, returnServers, testWithCluster, testWithCluster, testWithClusterWithIteration, testWithClusterWithIteration, 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
-