public class TestStochasticLoadBalancerHeterogeneousCostRules extends BalancerTestBase
BalancerTestBase.MockMapping
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private org.apache.hadoop.hbase.master.balancer.HeterogeneousRegionCountCostFunction |
costFunction |
(package private) static String |
DEFAULT_RULES_FILE_NAME |
private static HBaseTestingUtility |
HTU |
org.junit.rules.TestName |
name |
private String |
rulesFilename
Make a file for rules that is inside a temporary test dir named for the method so it doesn't
clash w/ other rule files.
|
clusterStateMocks, conf, largeCluster, loadBalancer, regionId
Constructor and Description |
---|
TestStochasticLoadBalancerHeterogeneousCostRules() |
Modifier and Type | Method and Description |
---|---|
void |
before() |
static void |
beforeClass() |
private static void |
cleanup(String file) |
(package private) static String |
createRulesFile(String file) |
(package private) static String |
createRulesFile(String file,
List<String> lines) |
void |
testBadFormatInRules() |
void |
testBadRegexp() |
void |
testLoadingFomHDFS() |
void |
testNoOverride() |
void |
testNoRules() |
void |
testTwoRules() |
assertClusterAsBalanced, assertClusterOverallAsBalanced, assertRegionReplicaPlacement, beforeAllTests, convertToList, createRegions, createServerMap, mockCluster, mockClusterServers, mockClusterServers, mockClusterServersWithTables, mockUniformClusterServers, printMock, printStats, randomRegions, randomRegions, randomServer, randomServers, reconcile, returnRegions, returnServer, returnServers, testWithCluster, testWithCluster, uniformRegions, updateLoad
public static final HBaseClassTestRule CLASS_RULE
public org.junit.rules.TestName name
static final String DEFAULT_RULES_FILE_NAME
private org.apache.hadoop.hbase.master.balancer.HeterogeneousRegionCountCostFunction costFunction
private static final HBaseTestingUtility HTU
private String rulesFilename
public TestStochasticLoadBalancerHeterogeneousCostRules()
public static void beforeClass() throws IOException
IOException
public void before() throws IOException
IOException
static String createRulesFile(String file, List<String> lines) throws IOException
file
- Name of file to write rules into.dir
+ DEFAULT_RULES_FILE_NAME.IOException
static String createRulesFile(String file) throws IOException
file
- Name of file to write rules into.dir
+ DEFAULT_RULES_FILE_NAME.IOException
private static void cleanup(String file) throws IOException
IOException
public void testNoRules() throws IOException
IOException
public void testBadFormatInRules() throws IOException
IOException
public void testTwoRules() throws IOException
IOException
public void testBadRegexp() throws IOException
IOException
public void testNoOverride() throws IOException
IOException
public void testLoadingFomHDFS() throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.