Class CacheAwareLoadBalancer
java.lang.Object
org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer
org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer
org.apache.hadoop.hbase.master.balancer.CacheAwareLoadBalancer
- All Implemented Interfaces:
ConfigurationObserver
,LoadBalancer
,Stoppable
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate class
(package private) static class
(package private) static class
private class
static enum
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer
StochasticLoadBalancer.GeneratorType
-
Field Summary
Modifier and TypeFieldDescriptionprivate org.apache.hadoop.conf.Configuration
private static final org.slf4j.Logger
Fields inherited from class org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer
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, namedQueueRecorder, OVERALL_COST_FUNCTION_NAME, regionCacheRatioOnOldServerMap, RUN_MAX_STEPS_KEY, STEPS_PER_REGION_KEY
Fields inherited from class org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer
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, onlySystemTablesOnMaster, rackManager, regionFinder, services, slop, useRegionFinder
Fields inherited from interface org.apache.hadoop.hbase.master.LoadBalancer
BOGUS_SERVER_NAME, SYSTEM_TABLES_ON_MASTER, TABLES_ON_MASTER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
addCostFunction
(List<CostFunction> costFunctions, CostFunction costFunction) protected List<CandidateGenerator>
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
Collect the amount of region cached for all the regions from all the active region servers.Methods inherited from class org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer
balanceTable, composeAttributeName, computeCost, functionCost, getCandidateGenerators, getCostFunctionNames, getCostFunctions, getRandomGenerator, initCosts, needsBalance, nextAction, setRackManager, updateBalancerLoadInfo, updateCostsAndWeightsWithAction, updateMetricsSize
Methods inherited from class org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer
assignMasterSystemRegions, balanceCluster, balanceMasterRegions, getConf, getDefaultSlop, idleRegionServerExist, initialize, isStopped, onConfigurationChange, postMasterStartupInitialize, preBalanceCluster, randomAssignment, regionOffline, regionOnline, retainAssignment, roundRobinAssignment, setMasterServices, shouldBeOnMaster, sloppyRegionServerExist, stop, toEnsumbleTableLoad, updateBalancerStatus
-
Field Details
-
LOG
-
configuration
-
-
Constructor Details
-
CacheAwareLoadBalancer
public CacheAwareLoadBalancer()
-
-
Method Details
-
loadConf
- Overrides:
loadConf
in classStochasticLoadBalancer
-
createCandidateGenerators
- Overrides:
createCandidateGenerators
in classStochasticLoadBalancer
-
createCostFunctions
protected List<CostFunction> createCostFunctions(org.apache.hadoop.conf.Configuration configuration) - Overrides:
createCostFunctions
in classStochasticLoadBalancer
-
addCostFunction
-
updateClusterMetrics
Description copied from interface:LoadBalancer
Set the current cluster status. This allows a LoadBalancer to map host name to a server- Specified by:
updateClusterMetrics
in interfaceLoadBalancer
- Overrides:
updateClusterMetrics
in classStochasticLoadBalancer
-
updateRegionLoad
Collect the amount of region cached for all the regions from all the active region servers. -
getRegionInfoByEncodedName
-