@InterfaceAudience.Private public class CacheAwareLoadBalancer extends StochasticLoadBalancer
| Modifier and Type | Class and Description |
|---|---|
static class |
CacheAwareLoadBalancer.GeneratorFunctionType |
StochasticLoadBalancer.GeneratorType| Modifier and Type | Field and Description |
|---|---|
static String |
CACHE_RATIO_THRESHOLD |
static float |
CACHE_RATIO_THRESHOLD_DEFAULT |
Float |
ratioThreshold |
candidateGenerators, COST_FUNCTIONS_COST_FUNCTIONS_KEY, costFunctions, DEFAULT_KEEP_REGION_LOADS, DEFAULT_MAX_RUNNING_TIME, DEFAULT_MAX_STEPS, DEFAULT_MIN_COST_NEED_BALANCE, DEFAULT_RUN_MAX_STEPS, DEFAULT_STEPS_PER_REGION, KEEP_REGION_LOADS, MAX_RUNNING_TIME_KEY, MAX_STEPS_KEY, MIN_COST_NEED_BALANCE_KEY, OVERALL_COST_FUNCTION_NAME, RUN_MAX_STEPS_KEY, shuffledGeneratorClasses, STEPS_PER_REGION_KEYBALANCER_DECISION_BUFFER_ENABLED, BALANCER_REJECTION_BUFFER_ENABLED, clusterStatus, DEFAULT_BALANCER_DECISION_BUFFER_ENABLED, DEFAULT_BALANCER_REJECTION_BUFFER_ENABLED, DEFAULT_HBASE_MASTER_LOADBALANCE_BYTABLE, isByTable, masterServerName, metricsBalancer, MIN_SERVER_BALANCE, onlySystemTablesOnMaster, rackManager, regionFinder, services, slop, useRegionFinderBOGUS_SERVER_NAME, HBASE_RSGROUP_LOADBALANCER_CLASS, MOVE_THROTTLING, MOVE_THROTTLING_DEFAULT, SYSTEM_TABLES_ON_MASTER, TABLES_ON_MASTER| Constructor and Description |
|---|
CacheAwareLoadBalancer() |
| Modifier and Type | Method and Description |
|---|---|
protected List<RegionPlan> |
balanceTable(TableName tableName,
Map<ServerName,List<RegionInfo>> loadOfOneTable)
Given the cluster state this will try and approach an optimal balance.
|
protected Map<Class<? extends org.apache.hadoop.hbase.master.balancer.CandidateGenerator>,org.apache.hadoop.hbase.master.balancer.CandidateGenerator> |
createCandidateGenerators() |
protected List<org.apache.hadoop.hbase.master.balancer.CostFunction> |
createCostFunctions(org.apache.hadoop.conf.Configuration configuration) |
void |
loadConf(org.apache.hadoop.conf.Configuration configuration) |
void |
throttle(RegionPlan plan) |
void |
updateClusterMetrics(ClusterMetrics clusterMetrics)
Set the current cluster status.
|
functionCost, getRandomGenerator, updateBalancerLoadInfoassignMasterSystemRegions, balanceCluster, balanceMasterRegions, getConf, getDefaultSlop, idleRegionServerExist, initialize, isStopped, onConfigurationChange, postMasterStartupInitialize, preBalanceCluster, randomAssignment, regionOffline, regionOnline, retainAssignment, roundRobinAssignment, setMasterServices, shouldBeOnMaster, sloppyRegionServerExist, stop, toEnsumbleTableLoad, updateBalancerStatusclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisMasterCanHostUserRegions, isSystemTablesOnlyOnMaster, isTablesOnMasterpublic static final String CACHE_RATIO_THRESHOLD
public static final float CACHE_RATIO_THRESHOLD_DEFAULT
public Float ratioThreshold
public void loadConf(org.apache.hadoop.conf.Configuration configuration)
loadConf in class StochasticLoadBalancerprotected Map<Class<? extends org.apache.hadoop.hbase.master.balancer.CandidateGenerator>,org.apache.hadoop.hbase.master.balancer.CandidateGenerator> createCandidateGenerators()
createCandidateGenerators in class StochasticLoadBalancerprotected List<org.apache.hadoop.hbase.master.balancer.CostFunction> createCostFunctions(org.apache.hadoop.conf.Configuration configuration)
createCostFunctions in class StochasticLoadBalancerpublic void updateClusterMetrics(ClusterMetrics clusterMetrics)
LoadBalancerupdateClusterMetrics in interface LoadBalancerupdateClusterMetrics in class StochasticLoadBalancerpublic void throttle(RegionPlan plan)
protected List<RegionPlan> balanceTable(TableName tableName, Map<ServerName,List<RegionInfo>> loadOfOneTable)
StochasticLoadBalancerbalanceTable in class StochasticLoadBalancertableName - the table to be balancedloadOfOneTable - region load of servers for the specific one tableCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.