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, updateLoadpublic 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
IOExceptionpublic void before() throws IOException
IOExceptionstatic String createRulesFile(String file, List<String> lines) throws IOException
file - Name of file to write rules into.dir + DEFAULT_RULES_FILE_NAME.IOExceptionstatic String createRulesFile(String file) throws IOException
file - Name of file to write rules into.dir + DEFAULT_RULES_FILE_NAME.IOExceptionprivate static void cleanup(String file) throws IOException
IOExceptionpublic void testNoRules() throws IOException
IOExceptionpublic void testBadFormatInRules() throws IOException
IOExceptionpublic void testTwoRules() throws IOException
IOExceptionpublic void testBadRegexp() throws IOException
IOExceptionpublic void testNoOverride() throws IOException
IOExceptionpublic void testLoadingFomHDFS() throws Exception
ExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.