Class CostFromRegionLoadFunction
java.lang.Object
org.apache.hadoop.hbase.master.balancer.CostFunction
org.apache.hadoop.hbase.master.balancer.CostFromRegionLoadFunction
- Direct Known Subclasses:
CostFromRegionLoadAsRateFunction,StoreFileCostFunction,StoreFileTableSkewCostFunction
Base class the allows writing costs functions from rolling average of some number from
RegionLoad.
-
Field Summary
FieldsFields inherited from class org.apache.hadoop.hbase.master.balancer.CostFunction
cluster -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate doublecomputeCostForRegionServer(int regionServerIndex) protected doublecost()protected abstract doubleprotected doublegetRegionLoadCost(Collection<BalancerRegionLoad> regionLoadList) (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) Methods inherited from class org.apache.hadoop.hbase.master.balancer.CostFunction
getCostEpsilon, getMultiplier, isNeeded, postAction, scale, setMultiplier, updateWeight
-
Field Details
-
cost
-
-
Constructor Details
-
CostFromRegionLoadFunction
-
-
Method Details
-
computeCostForRegionServer
-
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
-
regionMoved
- Overrides:
regionMovedin classCostFunction
-
cost
- Specified by:
costin classCostFunction
-
getRegionLoadCost
-
getCostFromRl
-