Class TestStochasticLoadBalancerHeterogeneousCost
java.lang.Object
org.apache.hadoop.hbase.master.balancer.BalancerTestBase
org.apache.hadoop.hbase.master.balancer.StochasticBalancerTestBase
org.apache.hadoop.hbase.master.balancer.TestStochasticLoadBalancerHeterogeneousCost
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
(package private) static class
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
BalancerTestBase.MockMapping
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final double
static final HBaseClassTestRule
private static final HBaseCommonTestingUtil
private static final org.slf4j.Logger
private static String
private Queue<org.apache.hadoop.hbase.ServerName>
Fields inherited from class org.apache.hadoop.hbase.master.balancer.StochasticBalancerTestBase
dummyMetricsStochasticBalancer, loadBalancer
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 org.apache.hadoop.hbase.master.balancer.ServerAndLoad
createServer
(String host) createServerMap
(int numNodes, int numRegions, int numRegionsPerServer, int replication, int numTables) protected TreeMap<org.apache.hadoop.hbase.ServerName,
List<org.apache.hadoop.hbase.client.RegionInfo>> mockClusterServers
(int[] mockCluster, int numTables) void
void
private void
testHeterogeneousWithCluster
(int numNodes, int numRegions, int numRegionsPerServer, List<String> rules) void
void
void
protected void
testWithCluster
(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.StochasticBalancerTestBase
testWithCluster, testWithClusterWithIteration, testWithClusterWithIteration
Methods inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
assertClusterAsBalanced, assertClusterOverallAsBalanced, assertRegionReplicaPlacement, convertToList, createRegions, mockCluster, mockClusterServers, mockClusterServers, mockClusterServersUnsorted, mockClusterServersWithTables, mockUniformClusterServers, printMock, printStats, randomRegions, randomRegions, randomServer, randomServers, reconcile, returnRegions, returnServer, returnServers, uniformRegions, updateLoad
-
Field Details
-
CLASS_RULE
-
LOG
-
ALLOWED_WINDOW
- See Also:
-
HTU
-
RULES_FILE
-
serverQueue
-
-
Constructor Details
-
TestStochasticLoadBalancerHeterogeneousCost
-
-
Method Details
-
beforeAllTests
- Throws:
IOException
-
testDefault
- Throws:
IOException
-
testOneGroup
- Throws:
IOException
-
testTwoGroups
- Throws:
IOException
-
testFourGroups
- Throws:
IOException
-
testOverloaded
- Throws:
IOException
-
testHeterogeneousWithCluster
private void testHeterogeneousWithCluster(int numNodes, int numRegions, int numRegionsPerServer, List<String> rules) throws IOException - Throws:
IOException
-
testWithCluster
protected void testWithCluster(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) - Overrides:
testWithCluster
in classStochasticBalancerTestBase
-
createServerMap
protected Map<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> createServerMap(int numNodes, int numRegions, int numRegionsPerServer, int replication, int numTables) - Overrides:
createServerMap
in classBalancerTestBase
-
mockClusterServers
protected TreeMap<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> mockClusterServers(int[] mockCluster, int numTables) - Overrides:
mockClusterServers
in classBalancerTestBase
-
createServer
-