public class TestStochasticLoadBalancer extends BalancerTestBase
| Modifier and Type | Class and Description |
|---|---|
private class |
TestStochasticLoadBalancer.MockCluster |
BalancerTestBase.MockMapping| Modifier and Type | Field and Description |
|---|---|
static HBaseClassTestRule |
CLASS_RULE |
private int[][][] |
clusterRegionLocationMocks
Data set for testLocalityCost: [test][0][0] = mapping of server to number of regions it hosts
[test][region + 1][0] = server that region is hosted on [test][region + 1][server + 1] =
locality for region on server
|
private float[] |
expectedLocalities |
private static String |
REGION_KEY |
private static org.apache.hadoop.conf.Configuration |
storedConfiguration |
clusterStateMocks, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, conf, dummyMetricsStochasticBalancer, largeCluster, loadBalancer, regionId| Constructor and Description |
|---|
TestStochasticLoadBalancer() |
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, updateLoadpublic static final HBaseClassTestRule CLASS_RULE
private static final String REGION_KEY
private float[] expectedLocalities
private static org.apache.hadoop.conf.Configuration storedConfiguration
private int[][][] clusterRegionLocationMocks
public TestStochasticLoadBalancer()
public static void saveInitialConfiguration()
public void beforeEachTest()
public void testKeepRegionLoad() throws Exception
Exceptionpublic void testUpdateBalancerLoadInfo()
public void testUpdateStochasticCosts()
public void testUpdateStochasticCostsIfBalanceNotRan()
public void testNeedBalance()
public void testBalanceOfSloppyServers()
public void testSloppyTablesLoadBalanceByTable()
private boolean hasEmptyBalancerPlans(int[] mockCluster)
private boolean hasEmptyBalancerPlans(int[][] mockCluster)
private boolean hasEmptyBalancerPlans(Map<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> servers)
public void testLocalityCost() throws Exception
Exceptionpublic void testMoveCostMultiplier() throws Exception
Exceptionpublic void testMoveCost() throws Exception
Exceptionpublic void testSkewCost()
public void testCostAfterUndoAction()
public void testTableSkewCost()
public void testRegionLoadCost()
public void testRegionLoadCostWhenDecrease()
public void testLosingRs() throws Exception
Exceptionpublic void testAdditionalCostFunction()
public void testDefaultCostFunctionList()
private boolean needsBalanceIdleRegion(int[] cluster)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.