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
Nested ClassesModifier and TypeClassDescriptionprivate class(package private) static class(package private) static classprivate classstatic enumNested classes/interfaces inherited from class org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer
StochasticLoadBalancer.GeneratorType -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hadoop.conf.Configurationprivate static final org.slf4j.LoggerFields 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_KEYFields 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, useRegionFinderFields inherited from interface org.apache.hadoop.hbase.master.LoadBalancer
BOGUS_SERVER_NAME, SYSTEM_TABLES_ON_MASTER, TABLES_ON_MASTER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddCostFunction(List<CostFunction> costFunctions, CostFunction costFunction) protected List<CandidateGenerator>protected List<CostFunction>createCostFunctions(org.apache.hadoop.conf.Configuration configuration) private RegionInfogetRegionInfoByEncodedName(BalancerClusterState cluster, String regionName) voidloadConf(org.apache.hadoop.conf.Configuration configuration) voidupdateClusterMetrics(ClusterMetrics clusterMetrics) Set the current cluster status.private voidCollect 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, updateMetricsSizeMethods 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:
loadConfin classStochasticLoadBalancer
-
createCandidateGenerators
- Overrides:
createCandidateGeneratorsin classStochasticLoadBalancer
-
createCostFunctions
protected List<CostFunction> createCostFunctions(org.apache.hadoop.conf.Configuration configuration) - Overrides:
createCostFunctionsin classStochasticLoadBalancer
-
addCostFunction
-
updateClusterMetrics
Description copied from interface:LoadBalancerSet the current cluster status. This allows a LoadBalancer to map host name to a server- Specified by:
updateClusterMetricsin interfaceLoadBalancer- Overrides:
updateClusterMetricsin classStochasticLoadBalancer
-
updateRegionLoad
Collect the amount of region cached for all the regions from all the active region servers. -
getRegionInfoByEncodedName
-