Class TestStochasticLoadBalancer
java.lang.Object
org.apache.hadoop.hbase.master.balancer.BalancerTestBase
org.apache.hadoop.hbase.master.balancer.TestStochasticLoadBalancer
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
BalancerTestBase.MockMapping -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate int[][][]Data set for testLocalityCost: [test][0][0] = mapping of server to number of regions it hosts [test][region + 1][0] = server that region is hosted on [test][region + 1][server + 1] = locality for region on serverprivate float[]private static final Stringprivate static org.apache.hadoop.conf.ConfigurationFields inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
clusterStateMocks, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, conf, dummyMetricsStochasticBalancer, largeCluster, loadBalancer, regionId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate booleanhasEmptyBalancerPlans(int[] mockCluster) private booleanhasEmptyBalancerPlans(int[][] mockCluster) private booleanhasEmptyBalancerPlans(Map<org.apache.hadoop.hbase.ServerName, List<org.apache.hadoop.hbase.client.RegionInfo>> servers) private booleanneedsBalanceIdleRegion(int[] cluster) static voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidMethods inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
assertClusterAsBalanced, assertClusterOverallAsBalanced, assertRegionReplicaPlacement, beforeAllTests, convertToList, createRegions, createServerMap, mockCluster, mockClusterServers, mockClusterServers, mockClusterServers, mockClusterServersUnsorted, mockClusterServersWithTables, mockUniformClusterServers, printMock, printStats, randomRegions, randomRegions, randomServer, randomServers, reconcile, returnRegions, returnServer, returnServers, testWithCluster, testWithCluster, testWithClusterWithIteration, testWithClusterWithIteration, uniformRegions, updateLoad
-
Field Details
-
CLASS_RULE
-
REGION_KEY
- See Also:
-
expectedLocalities
-
storedConfiguration
-
clusterRegionLocationMocks
Data set for testLocalityCost: [test][0][0] = mapping of server to number of regions it hosts [test][region + 1][0] = server that region is hosted on [test][region + 1][server + 1] = locality for region on server
-
-
Constructor Details
-
TestStochasticLoadBalancer
public TestStochasticLoadBalancer()
-
-
Method Details
-
saveInitialConfiguration
-
beforeEachTest
-
testKeepRegionLoad
- Throws:
Exception
-
testUpdateBalancerLoadInfo
-
testUpdateStochasticCosts
-
testUpdateStochasticCostsIfBalanceNotRan
-
testNeedBalance
-
testBalanceOfSloppyServers
-
testSloppyTablesLoadBalanceByTable
-
hasEmptyBalancerPlans
-
hasEmptyBalancerPlans
-
hasEmptyBalancerPlans
private boolean hasEmptyBalancerPlans(Map<org.apache.hadoop.hbase.ServerName, List<org.apache.hadoop.hbase.client.RegionInfo>> servers) -
testLocalityCost
- Throws:
Exception
-
testMoveCostMultiplier
- Throws:
Exception
-
testMoveCost
- Throws:
Exception
-
testSkewCost
-
testCostAfterUndoAction
-
testTableSkewCost
-
testRegionLoadCost
-
testRegionLoadCostWhenDecrease
-
testLosingRs
- Throws:
Exception
-
testAdditionalCostFunction
-
testDefaultCostFunctionList
-
needsBalanceIdleRegion
-