public class TestFavoredStochasticLoadBalancer extends BalancerTestBase
BalancerTestBase.MockMapping| Modifier and Type | Field and Description |
|---|---|
private org.apache.hadoop.hbase.client.Admin |
admin |
static HBaseClassTestRule |
CLASS_RULE |
private MiniHBaseCluster |
cluster |
private static org.slf4j.Logger |
LOG |
private org.apache.hadoop.hbase.master.HMaster |
master |
private static int |
REGION_NUM |
private static int |
SLAVES |
private static HBaseTestingUtility |
TEST_UTIL |
clusterStateMocks, conf, largeCluster, loadBalancer, regionId| Constructor and Description |
|---|
TestFavoredStochasticLoadBalancer() |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkFavoredNodeAssignments(org.apache.hadoop.hbase.TableName tableName,
org.apache.hadoop.hbase.favored.FavoredNodesManager fnm,
org.apache.hadoop.hbase.master.assignment.RegionStates regionStates) |
private void |
compactTable(org.apache.hadoop.hbase.TableName tableName) |
static void |
setupBeforeClass() |
void |
startCluster() |
void |
stopCluster() |
private void |
stopServersAndWaitUntilProcessed(List<org.apache.hadoop.hbase.ServerName> currentFN) |
void |
test2FavoredNodesDead() |
void |
testAllFavoredNodesDead() |
void |
testAllFavoredNodesDeadMasterRestarted() |
void |
testBalancerWithoutFavoredNodes() |
void |
testBasicBalance() |
void |
testBasicRegionPlacementAndReplicaLoad() |
void |
testMisplacedRegions() |
void |
testRandomAssignmentWithNoFavNodes() |
void |
testRoundRobinAssignment() |
assertClusterAsBalanced, assertClusterOverallAsBalanced, assertRegionReplicaPlacement, beforeAllTests, convertToList, 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
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility TEST_UTIL
private static final int SLAVES
private static final int REGION_NUM
private org.apache.hadoop.hbase.client.Admin admin
private org.apache.hadoop.hbase.master.HMaster master
private MiniHBaseCluster cluster
public TestFavoredStochasticLoadBalancer()
public static void setupBeforeClass() throws Exception
Exceptionpublic void startCluster() throws Exception
Exceptionpublic void stopCluster() throws Exception
Exceptionpublic void testBasicBalance() throws Exception
Exceptionpublic void testRoundRobinAssignment() throws Exception
Exceptionpublic void testBasicRegionPlacementAndReplicaLoad() throws Exception
Exceptionpublic void testRandomAssignmentWithNoFavNodes() throws Exception
Exceptionpublic void testBalancerWithoutFavoredNodes() throws Exception
Exceptionpublic void testMisplacedRegions() throws Exception
Exceptionpublic void test2FavoredNodesDead() throws Exception
Exceptionpublic void testAllFavoredNodesDead() throws Exception
Exceptionpublic void testAllFavoredNodesDeadMasterRestarted() throws Exception
Exceptionprivate void checkFavoredNodeAssignments(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.favored.FavoredNodesManager fnm, org.apache.hadoop.hbase.master.assignment.RegionStates regionStates) throws IOException
IOExceptionprivate void stopServersAndWaitUntilProcessed(List<org.apache.hadoop.hbase.ServerName> currentFN) throws Exception
Exceptionprivate void compactTable(org.apache.hadoop.hbase.TableName tableName) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.