Class CostFromRegionLoadFunction
java.lang.Object
org.apache.hadoop.hbase.master.balancer.CostFunction
org.apache.hadoop.hbase.master.balancer.CostFromRegionLoadFunction
- Direct Known Subclasses:
CostFromRegionLoadAsRateFunction
,StoreFileCostFunction
Base class the allows writing costs functions from rolling average of some number from
RegionLoad.
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.master.balancer.CostFunction
cluster, COST_EPSILON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate double
computeCostForRegionServer
(int regionServerIndex) protected final double
cost()
protected abstract double
protected double
getRegionLoadCost
(Collection<BalancerRegionLoad> regionLoadList) (package private) void
prepare
(BalancerClusterState cluster) Called once per LB invocation to give the cost function to initialize it's state, and perform any costly calculation.protected void
regionMoved
(int region, int oldServer, int newServer) Methods inherited from class org.apache.hadoop.hbase.master.balancer.CostFunction
getMultiplier, isNeeded, postAction, scale, setMultiplier, updateWeight
-
Field Details
-
cost
-
-
Constructor Details
-
CostFromRegionLoadFunction
-
-
Method Details
-
computeCostForRegionServer
-
prepare
Description copied from class:CostFunction
Called once per LB invocation to give the cost function to initialize it's state, and perform any costly calculation.- Overrides:
prepare
in classCostFunction
-
regionMoved
- Overrides:
regionMoved
in classCostFunction
-
cost
- Specified by:
cost
in classCostFunction
-
getRegionLoadCost
-
getCostFromRl
-