Class MoveCostFunction
java.lang.Object
org.apache.hadoop.hbase.master.balancer.CostFunction
org.apache.hadoop.hbase.master.balancer.MoveCostFunction
Given the starting state of the regions and a potential ending state compute cost based upon the
number of regions that have moved.
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final float
private static final int
(package private) static final float
(package private) static final float
private static final String
private final float
private static final String
private static final String
private final float
private final float
private final OffPeakHours
Fields inherited from class org.apache.hadoop.hbase.master.balancer.CostFunction
cluster, COST_EPSILON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected double
cost()
(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.Methods inherited from class org.apache.hadoop.hbase.master.balancer.CostFunction
getMultiplier, isNeeded, postAction, regionMoved, scale, setMultiplier, updateWeight
-
Field Details
-
MOVE_COST_KEY
- See Also:
-
MOVE_COST_OFFPEAK_KEY
- See Also:
-
MAX_MOVES_PERCENT_KEY
- See Also:
-
DEFAULT_MOVE_COST
- See Also:
-
DEFAULT_MOVE_COST_OFFPEAK
- See Also:
-
DEFAULT_MAX_MOVES
- See Also:
-
DEFAULT_MAX_MOVE_PERCENT
- See Also:
-
maxMovesPercent
-
offPeakHours
-
moveCost
-
moveCostOffPeak
-
-
Constructor Details
-
MoveCostFunction
MoveCostFunction(org.apache.hadoop.conf.Configuration conf)
-
-
Method Details
-
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
-
cost
- Specified by:
cost
in classCostFunction
-