Class CacheAwareLoadBalancer.CacheAwareRegionSkewnessCostFunction
java.lang.Object
org.apache.hadoop.hbase.master.balancer.CostFunction
org.apache.hadoop.hbase.master.balancer.CacheAwareLoadBalancer.CacheAwareRegionSkewnessCostFunction
- Enclosing class:
- CacheAwareLoadBalancer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DoubleArrayCost(package private) static final float(package private) static final StringFields inherited from class org.apache.hadoop.hbase.master.balancer.CostFunction
cluster -
Constructor Summary
ConstructorsConstructorDescriptionCacheAwareRegionSkewnessCostFunction(org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionprotected doublecost()(package private) voidprepare(BalancerClusterState cluster) Called once per LB invocation to give the cost function to initialize it's state, and perform any costly calculation.protected voidregionMoved(int region, int oldServer, int newServer) final voidupdateWeight(Map<Class<? extends CandidateGenerator>, Double> weights) Add the cost of this cost function to the weight of the candidate generator that is optimized for this cost function.Methods inherited from class org.apache.hadoop.hbase.master.balancer.CostFunction
getCostEpsilon, getMultiplier, isNeeded, postAction, scale, setMultiplier
-
Field Details
-
REGION_COUNT_SKEW_COST_KEY
- See Also:
-
DEFAULT_REGION_COUNT_SKEW_COST
- See Also:
-
cost
-
-
Constructor Details
-
CacheAwareRegionSkewnessCostFunction
CacheAwareRegionSkewnessCostFunction(org.apache.hadoop.conf.Configuration conf)
-
-
Method Details
-
prepare
Description copied from class:CostFunctionCalled once per LB invocation to give the cost function to initialize it's state, and perform any costly calculation.- Overrides:
preparein classCostFunction
-
cost
- Specified by:
costin classCostFunction
-
regionMoved
- Overrides:
regionMovedin classCostFunction
-
updateWeight
Description copied from class:CostFunctionAdd the cost of this cost function to the weight of the candidate generator that is optimized for this cost function. By default it is the RandomCandiateGenerator for a cost function. Called once per init or after postAction.- Overrides:
updateWeightin classCostFunction- Parameters:
weights- the weights for every generator.
-