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 |
clusterStateMocks, conf, largeCluster, loadBalancer, regionId| Constructor and Description |
|---|
TestStochasticLoadBalancer() |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
needsBalanceIdleRegion(int[] cluster) |
void |
testAdditionalCostFunction() |
void |
testCostAfterUndoAction() |
void |
testCostFromArray() |
void |
testKeepRegionLoad() |
void |
testLocalityCost() |
void |
testLosingRs() |
void |
testMoveCost() |
void |
testNeedBalance() |
void |
testRegionLoadCost() |
void |
testSkewCost() |
void |
testTableSkewCost() |
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
private static final String REGION_KEY
private float[] expectedLocalities
private int[][][] clusterRegionLocationMocks
public TestStochasticLoadBalancer()
public void testKeepRegionLoad() throws Exception
Exceptionpublic void testNeedBalance()
public void testLocalityCost() throws Exception
Exceptionpublic void testMoveCost() throws Exception
Exceptionpublic void testSkewCost()
public void testCostAfterUndoAction()
public void testTableSkewCost()
public void testRegionLoadCost()
public void testCostFromArray()
public void testLosingRs() throws Exception
Exceptionpublic void testAdditionalCostFunction()
private boolean needsBalanceIdleRegion(int[] cluster)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.