@InterfaceAudience.Private public class CacheAwareLoadBalancer extends StochasticLoadBalancer
Modifier and Type | Class and Description |
---|---|
private class |
CacheAwareLoadBalancer.CacheAwareCandidateGenerator |
(package private) static class |
CacheAwareLoadBalancer.CacheAwareCostFunction |
(package private) static class |
CacheAwareLoadBalancer.CacheAwareRegionSkewnessCostFunction |
private class |
CacheAwareLoadBalancer.CacheAwareSkewnessCandidateGenerator |
static class |
CacheAwareLoadBalancer.GeneratorFunctionType |
StochasticLoadBalancer.GeneratorType
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
configuration |
private static org.slf4j.Logger |
LOG |
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, loads, MAX_RUNNING_TIME_KEY, MAX_STEPS_KEY, MIN_COST_NEED_BALANCE_KEY, OVERALL_COST_FUNCTION_NAME, regionCacheRatioOnOldServerMap, RUN_MAX_STEPS_KEY, STEPS_PER_REGION_KEY
BALANCER_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, provider, rackManager, regionFinder, slop, useRegionFinder
BOGUS_SERVER_NAME, HBASE_RSGROUP_LOADBALANCER_CLASS
Constructor and Description |
---|
CacheAwareLoadBalancer() |
Modifier and Type | Method and Description |
---|---|
private void |
addCostFunction(List<CostFunction> costFunctions,
CostFunction costFunction) |
protected List<CandidateGenerator> |
createCandidateGenerators() |
protected List<CostFunction> |
createCostFunctions(org.apache.hadoop.conf.Configuration configuration) |
private RegionInfo |
getRegionInfoByEncodedName(BalancerClusterState cluster,
String regionName) |
void |
loadConf(org.apache.hadoop.conf.Configuration configuration) |
void |
updateClusterMetrics(ClusterMetrics clusterMetrics)
Set the current cluster status.
|
private void |
updateRegionLoad()
Collect the amount of region cached for all the regions from all the active region servers.
|
balanceTable, composeAttributeName, computeCost, functionCost, getCandidateGenerators, getCostFunctionNames, getCostFunctions, getRandomGenerator, initCosts, needsBalance, nextAction, sendRejectionReasonToRingBuffer, setRackManager, updateBalancerLoadInfo, updateCostsAndWeightsWithAction, updateMetricsSize
balanceCluster, getConf, getDefaultSlop, idleRegionServerExist, initialize, isStopped, onConfigurationChange, postMasterStartupInitialize, preBalanceCluster, randomAssignment, regionOffline, regionOnline, retainAssignment, roundRobinAssignment, setClusterInfoProvider, sloppyRegionServerExist, stop, toEnsumbleTableLoad, updateBalancerStatus
private static final org.slf4j.Logger LOG
private org.apache.hadoop.conf.Configuration configuration
public CacheAwareLoadBalancer()
public void loadConf(org.apache.hadoop.conf.Configuration configuration)
loadConf
in class StochasticLoadBalancer
protected List<CandidateGenerator> createCandidateGenerators()
createCandidateGenerators
in class StochasticLoadBalancer
protected List<CostFunction> createCostFunctions(org.apache.hadoop.conf.Configuration configuration)
createCostFunctions
in class StochasticLoadBalancer
private void addCostFunction(List<CostFunction> costFunctions, CostFunction costFunction)
public void updateClusterMetrics(ClusterMetrics clusterMetrics)
LoadBalancer
updateClusterMetrics
in interface LoadBalancer
updateClusterMetrics
in class StochasticLoadBalancer
private void updateRegionLoad()
private RegionInfo getRegionInfoByEncodedName(BalancerClusterState cluster, String regionName)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.