Class TableSkewCostFunction
java.lang.Object
org.apache.hadoop.hbase.master.balancer.CostFunction
org.apache.hadoop.hbase.master.balancer.TableSkewCostFunction
Compute the cost of a potential cluster configuration based upon how evenly distributed tables
are.
-
Field Summary
Modifier and TypeFieldDescription(package private) DoubleArrayCost[]
private static final float
private static final String
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.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
-
TABLE_SKEW_COST_KEY
- See Also:
-
DEFAULT_TABLE_SKEW_COST
- See Also:
-
costsPerTable
-
-
Constructor Details
-
TableSkewCostFunction
TableSkewCostFunction(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
-
regionMoved
- Overrides:
regionMoved
in classCostFunction
-
cost
- Specified by:
cost
in classCostFunction
-