@InterfaceAudience.Private abstract class CostFromRegionLoadFunction extends CostFunction
| Modifier and Type | Field and Description |
|---|---|
private DoubleArrayCost |
cost |
cluster, COST_EPSILON| Constructor and Description |
|---|
CostFromRegionLoadFunction() |
| Modifier and Type | Method and Description |
|---|---|
private double |
computeCostForRegionServer(int regionServerIndex) |
protected double |
cost() |
protected abstract double |
getCostFromRl(BalancerRegionLoad rl) |
protected double |
getRegionLoadCost(Collection<BalancerRegionLoad> regionLoadList) |
(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, isNeeded, postAction, scale, setMultiplier, updateWeightprivate final DoubleArrayCost cost
CostFromRegionLoadFunction()
private double computeCostForRegionServer(int regionServerIndex)
void prepare(BalancerClusterState cluster)
CostFunctionprepare in class CostFunctionprotected void regionMoved(int region, int oldServer, int newServer)
regionMoved in class CostFunctionprotected final double cost()
cost in class CostFunctionprotected double getRegionLoadCost(Collection<BalancerRegionLoad> regionLoadList)
protected abstract double getCostFromRl(BalancerRegionLoad rl)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.