@InterfaceAudience.Private class PrimaryRegionCountSkewCostFunction extends CostFunction
| Modifier and Type | Field and Description |
|---|---|
private DoubleArrayCost |
cost |
private static float |
DEFAULT_PRIMARY_REGION_COUNT_SKEW_COST |
private static String |
PRIMARY_REGION_COUNT_SKEW_COST_KEY |
cluster, COST_EPSILON| Constructor and Description |
|---|
PrimaryRegionCountSkewCostFunction(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
private double |
computeCostForRegionServer(int regionServerIndex) |
protected double |
cost() |
(package private) boolean |
isNeeded() |
(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) |
getMultiplier, postAction, scale, setMultiplier, updateWeightprivate static final String PRIMARY_REGION_COUNT_SKEW_COST_KEY
private static final float DEFAULT_PRIMARY_REGION_COUNT_SKEW_COST
private final DoubleArrayCost cost
PrimaryRegionCountSkewCostFunction(org.apache.hadoop.conf.Configuration conf)
private double computeCostForRegionServer(int regionServerIndex)
void prepare(BalancerClusterState cluster)
CostFunctionprepare in class CostFunctionprotected void regionMoved(int region, int oldServer, int newServer)
regionMoved in class CostFunctionboolean isNeeded()
isNeeded in class CostFunctionprotected double cost()
cost in class CostFunctionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.