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, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, conf, dummyMetricsStochasticBalancer, 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, createRegions, createServerMap, mockCluster, mockClusterServers, mockClusterServers, mockClusterServers, mockClusterServersWithTables, mockUniformClusterServers, printMock, printStats, randomRegions, randomRegions, randomServer, randomServers, reconcile, returnRegions, returnServer, returnServers, testWithCluster, testWithCluster, testWithClusterWithIteration, testWithClusterWithIteration, uniformRegions, updateLoad
public 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
Exception
public void startCluster() throws Exception
Exception
public void stopCluster() throws Exception
Exception
public void testBasicBalance() throws Exception
Exception
public void testRoundRobinAssignment() throws Exception
Exception
public void testBasicRegionPlacementAndReplicaLoad() throws Exception
Exception
public void testRandomAssignmentWithNoFavNodes() throws Exception
Exception
public void testBalancerWithoutFavoredNodes() throws Exception
Exception
public void testMisplacedRegions() throws Exception
Exception
public void test2FavoredNodesDead() throws Exception
Exception
public void testAllFavoredNodesDead() throws Exception
Exception
public void testAllFavoredNodesDeadMasterRestarted() throws Exception
Exception
private 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
IOException
private void stopServersAndWaitUntilProcessed(List<org.apache.hadoop.hbase.ServerName> currentFN) throws Exception
Exception
private void compactTable(org.apache.hadoop.hbase.TableName tableName) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.