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
FieldsModifier and TypeFieldDescriptionprivate static final floatprivate static final int(package private) static final float(package private) static final floatprivate static final Stringprivate final floatprivate static final Stringprivate static final Stringprivate final floatprivate final floatprivate final OffPeakHoursFields inherited from class org.apache.hadoop.hbase.master.balancer.CostFunction
cluster, COST_EPSILON -
Constructor Summary
Constructors -
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.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: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
-