public class TestCacheAwareLoadBalancer extends BalancerTestBase
BalancerTestBase.MockMapping
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static org.apache.hadoop.hbase.master.balancer.CacheAwareLoadBalancer |
loadBalancer |
private static org.slf4j.Logger |
LOG |
(package private) static List<org.apache.hadoop.hbase.ServerName> |
servers |
(package private) static List<org.apache.hadoop.hbase.client.TableDescriptor> |
tableDescs |
(package private) static Map<org.apache.hadoop.hbase.TableName,String> |
tableMap |
(package private) static org.apache.hadoop.hbase.TableName[] |
tables |
clusterStateMocks, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, conf, largeCluster, regionId
Constructor and Description |
---|
TestCacheAwareLoadBalancer() |
Modifier and Type | Method and Description |
---|---|
static void |
beforeAllTests() |
private static List<org.apache.hadoop.hbase.client.TableDescriptor> |
constructTableDesc(boolean hasBogusTable) |
private static List<org.apache.hadoop.hbase.ServerName> |
generateServers(int numServers) |
private org.apache.hadoop.hbase.ServerMetrics |
mockServerMetricsWithRegionCacheInfo(org.apache.hadoop.hbase.ServerName server,
List<org.apache.hadoop.hbase.client.RegionInfo> regionsOnServer,
float currentCacheRatio,
List<org.apache.hadoop.hbase.client.RegionInfo> oldRegionCacheInfo,
int oldRegionCachedSize,
int regionSize) |
void |
testRegionsFullyCachedOnOldAndCurrentServers() |
void |
testRegionsFullyCachedOnOldServerAndNotCachedOnCurrentServers() |
void |
testRegionsNotCachedOnOldServerAndCurrentServer() |
void |
testRegionsPartiallyCachedOnOldServerAndCurrentServer() |
void |
testRegionsPartiallyCachedOnOldServerAndNotCachedOnCurrentServer() |
assertClusterAsBalanced, assertClusterOverallAsBalanced, assertRegionReplicaPlacement, convertToList, createRegions, createServerMap, mockCluster, mockClusterServers, mockClusterServers, mockClusterServers, mockClusterServersUnsorted, mockClusterServersWithTables, mockUniformClusterServers, printMock, printStats, randomRegions, randomRegions, randomServer, randomServers, reconcile, returnRegions, returnServer, returnServers, uniformRegions, updateLoad
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static org.apache.hadoop.hbase.master.balancer.CacheAwareLoadBalancer loadBalancer
static List<org.apache.hadoop.hbase.client.TableDescriptor> tableDescs
static org.apache.hadoop.hbase.TableName[] tables
public TestCacheAwareLoadBalancer()
private static List<org.apache.hadoop.hbase.ServerName> generateServers(int numServers)
private static List<org.apache.hadoop.hbase.client.TableDescriptor> constructTableDesc(boolean hasBogusTable)
private org.apache.hadoop.hbase.ServerMetrics mockServerMetricsWithRegionCacheInfo(org.apache.hadoop.hbase.ServerName server, List<org.apache.hadoop.hbase.client.RegionInfo> regionsOnServer, float currentCacheRatio, List<org.apache.hadoop.hbase.client.RegionInfo> oldRegionCacheInfo, int oldRegionCachedSize, int regionSize)
public static void beforeAllTests() throws Exception
Exception
public void testRegionsNotCachedOnOldServerAndCurrentServer() throws Exception
Exception
public void testRegionsPartiallyCachedOnOldServerAndNotCachedOnCurrentServer() throws Exception
Exception
public void testRegionsFullyCachedOnOldServerAndNotCachedOnCurrentServers() throws Exception
Exception
public void testRegionsFullyCachedOnOldAndCurrentServers() throws Exception
Exception
public void testRegionsPartiallyCachedOnOldServerAndCurrentServer() throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.