Class TestCacheAwareLoadBalancer
java.lang.Object
org.apache.hadoop.hbase.master.balancer.BalancerTestBase
org.apache.hadoop.hbase.master.balancer.TestCacheAwareLoadBalancer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
BalancerTestBase.MockMapping
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static org.apache.hadoop.hbase.master.balancer.CacheAwareLoadBalancer
private static final org.slf4j.Logger
(package private) static List<org.apache.hadoop.hbase.ServerName>
(package private) static List<org.apache.hadoop.hbase.client.TableDescriptor>
(package private) static org.apache.hadoop.hbase.TableName[]
Fields inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
clusterStateMocks, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, conf, largeCluster, regionId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
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
void
void
void
void
Methods inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
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
-
Field Details
-
CLASS_RULE
-
LOG
-
loadBalancer
-
servers
-
tableDescs
-
tableMap
-
tables
-
-
Constructor Details
-
TestCacheAwareLoadBalancer
public TestCacheAwareLoadBalancer()
-
-
Method Details
-
generateServers
-
constructTableDesc
private static List<org.apache.hadoop.hbase.client.TableDescriptor> constructTableDesc(boolean hasBogusTable) -
mockServerMetricsWithRegionCacheInfo
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) -
beforeAllTests
- Throws:
Exception
-
testRegionsNotCachedOnOldServerAndCurrentServer
- Throws:
Exception
-
testRegionsPartiallyCachedOnOldServerAndNotCachedOnCurrentServer
- Throws:
Exception
-
testRegionsFullyCachedOnOldServerAndNotCachedOnCurrentServers
- Throws:
Exception
-
testRegionsFullyCachedOnOldAndCurrentServers
- Throws:
Exception
-
testRegionsPartiallyCachedOnOldServerAndCurrentServer
- Throws:
Exception
-