Class PrimaryRegionCountSkewCostFunction
java.lang.Object
org.apache.hadoop.hbase.master.balancer.CostFunction
org.apache.hadoop.hbase.master.balancer.PrimaryRegionCountSkewCostFunction
Compute the cost of a potential cluster state from skew in number of primary regions on a
cluster.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DoubleArrayCostprivate static final floatprivate static final StringFields inherited from class org.apache.hadoop.hbase.master.balancer.CostFunction
cluster -
Constructor Summary
ConstructorsConstructorDescriptionPrimaryRegionCountSkewCostFunction(org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionprivate doublecomputeCostForRegionServer(int regionServerIndex) protected doublecost()(package private) booleanisNeeded()(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, postAction, scale, setMultiplier, updateWeight
-
Field Details
-
PRIMARY_REGION_COUNT_SKEW_COST_KEY
- See Also:
-
DEFAULT_PRIMARY_REGION_COUNT_SKEW_COST
- See Also:
-
cost
-
-
Constructor Details
-
PrimaryRegionCountSkewCostFunction
PrimaryRegionCountSkewCostFunction(org.apache.hadoop.conf.Configuration conf)
-
-
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
-
isNeeded
boolean isNeeded()- Overrides:
isNeededin classCostFunction
-
cost
- Specified by:
costin classCostFunction
-