Class StochasticBalancerTestBase
java.lang.Object
org.apache.hadoop.hbase.master.balancer.BalancerTestBase
org.apache.hadoop.hbase.master.balancer.StochasticBalancerTestBase
- Direct Known Subclasses:
StochasticBalancerTestBase2
,TestBalancerDecision
,TestBalancerRejection
,TestCacheAwareLoadBalancerCostFunctions
,TestStochasticLoadBalancer
,TestStochasticLoadBalancerBalanceCluster
,TestStochasticLoadBalancerHeterogeneousCost
,TestStochasticLoadBalancerHeterogeneousCostRules
,TestStochasticLoadBalancerHeterogeneousCostRulesLoadFromHDFS
,TestStochasticLoadBalancerLargeCluster
,TestStochasticLoadBalancerMidCluster
,TestStochasticLoadBalancerRegionReplica
,TestStochasticLoadBalancerRegionReplicaLargeCluster
,TestStochasticLoadBalancerRegionReplicaSameHosts
,TestStochasticLoadBalancerRegionReplicaWithRacks
,TestStochasticLoadBalancerSmallCluster
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
BalancerTestBase.MockMapping
-
Field Summary
Modifier and TypeFieldDescriptionprotected static DummyMetricsStochasticBalancer
protected static org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer
private static final org.slf4j.Logger
private static final Duration
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
private Duration
protected void
protected void
setMaxRunTime
(Duration maxRunTime) protected void
testWithClusterWithIteration
(int numNodes, int numRegions, int numRegionsPerServer, int replication, int numTables, boolean assertFullyBalanced, boolean assertFullyBalancedForReplicas) protected void
testWithClusterWithIteration
(Map<org.apache.hadoop.hbase.ServerName, List<org.apache.hadoop.hbase.client.RegionInfo>> serverMap, org.apache.hadoop.hbase.master.RackManager rackManager, boolean assertFullyBalanced, boolean assertFullyBalancedForReplicas) 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
-
LOG
-
MAX_MAX_RUN_TIME
-
loadBalancer
-
dummyMetricsStochasticBalancer
-
-
Constructor Details
-
StochasticBalancerTestBase
public StochasticBalancerTestBase()
-
-
Method Details
-
beforeAllTests
- Throws:
Exception
-
setMaxRunTime
-
testWithClusterWithIteration
protected void testWithClusterWithIteration(int numNodes, int numRegions, int numRegionsPerServer, int replication, int numTables, boolean assertFullyBalanced, boolean assertFullyBalancedForReplicas) -
increaseMaxRunTimeOrFail
-
testWithClusterWithIteration
protected void testWithClusterWithIteration(Map<org.apache.hadoop.hbase.ServerName, List<org.apache.hadoop.hbase.client.RegionInfo>> serverMap, org.apache.hadoop.hbase.master.RackManager rackManager, boolean assertFullyBalanced, boolean assertFullyBalancedForReplicas) -
getCurrentMaxRunTime
-