public class TestBaseLoadBalancer extends BalancerTestBase
Modifier and Type | Class and Description |
---|---|
static class |
TestBaseLoadBalancer.MockBalancer |
BalancerTestBase.MockMapping
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static TestBaseLoadBalancer.MockBalancer |
loadBalancer |
private static org.slf4j.Logger |
LOG |
private static org.apache.hadoop.hbase.ServerName |
master |
org.junit.rules.TestName |
name |
private static int |
NUM_SERVERS |
private static org.apache.hadoop.hbase.master.RackManager |
rackManager |
(package private) int[][] |
regionsAndServersMocks |
private static org.apache.hadoop.hbase.ServerName[] |
servers |
clusterStateMocks, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, conf, dummyMetricsStochasticBalancer, largeCluster, regionId
Constructor and Description |
---|
TestBaseLoadBalancer() |
Modifier and Type | Method and Description |
---|---|
private void |
assertRetainedAssignment(Map<org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.hbase.ServerName> existing,
List<org.apache.hadoop.hbase.ServerName> servers,
Map<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> assignment)
Asserts a valid retained assignment plan.
|
private void |
assignRegions(List<org.apache.hadoop.hbase.client.RegionInfo> regions,
List<org.apache.hadoop.hbase.ServerName> servers,
Map<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> clusterState) |
static void |
beforeAllTests() |
private List<org.apache.hadoop.hbase.ServerName> |
getListOfServerNames(List<org.apache.hadoop.hbase.master.balancer.ServerAndLoad> sals) |
void |
testBulkAssignment()
Tests the bulk assignment used during cluster startup.
|
void |
testClusterRegionLocations() |
void |
testClusterServersWithSameHostPort() |
void |
testRandomAssignment() |
private void |
testRandomAssignment(int numberOfIdleServers) |
void |
testRegionAvailability() |
void |
testRegionAvailabilityWithRegionMoves() |
void |
testRetainAssignment()
Test the cluster startup bulk assignment which attempts to retain assignment info.
|
assertClusterAsBalanced, assertClusterOverallAsBalanced, assertRegionReplicaPlacement, 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 TestBaseLoadBalancer.MockBalancer loadBalancer
private static final org.slf4j.Logger LOG
private static final org.apache.hadoop.hbase.ServerName master
private static org.apache.hadoop.hbase.master.RackManager rackManager
private static final int NUM_SERVERS
private static org.apache.hadoop.hbase.ServerName[] servers
int[][] regionsAndServersMocks
public org.junit.rules.TestName name
public TestBaseLoadBalancer()
public static void beforeAllTests() throws Exception
Exception
public void testBulkAssignment() throws Exception
Exception
public void testRetainAssignment() throws Exception
Exception
public void testRandomAssignment() throws Exception
Exception
private void testRandomAssignment(int numberOfIdleServers) throws Exception
Exception
public void testRegionAvailability() throws Exception
Exception
public void testRegionAvailabilityWithRegionMoves() throws Exception
Exception
private List<org.apache.hadoop.hbase.ServerName> getListOfServerNames(List<org.apache.hadoop.hbase.master.balancer.ServerAndLoad> sals)
private void assertRetainedAssignment(Map<org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.hbase.ServerName> existing, List<org.apache.hadoop.hbase.ServerName> servers, Map<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> assignment)
Must meet the following conditions:
public void testClusterServersWithSameHostPort()
private void assignRegions(List<org.apache.hadoop.hbase.client.RegionInfo> regions, List<org.apache.hadoop.hbase.ServerName> servers, Map<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> clusterState)
public void testClusterRegionLocations()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.