Class TestStochasticLoadBalancer
java.lang.Object
org.apache.hadoop.hbase.master.balancer.BalancerTestBase
org.apache.hadoop.hbase.master.balancer.TestStochasticLoadBalancer
-
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 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 String
private static org.apache.hadoop.conf.Configuration
Fields inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
clusterStateMocks, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, conf, dummyMetricsStochasticBalancer, largeCluster, loadBalancer, regionId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
private boolean
hasEmptyBalancerPlans
(int[] mockCluster) private boolean
hasEmptyBalancerPlans
(int[][] mockCluster) private boolean
hasEmptyBalancerPlans
(Map<org.apache.hadoop.hbase.ServerName, List<org.apache.hadoop.hbase.client.RegionInfo>> servers) private boolean
needsBalanceIdleRegion
(int[] cluster) static void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
Methods 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
-