@InterfaceAudience.Private class MoveCostFunction extends CostFunction
Modifier and Type | Field and Description |
---|---|
private static float |
DEFAULT_MAX_MOVE_PERCENT |
private static int |
DEFAULT_MAX_MOVES |
(package private) static float |
DEFAULT_MOVE_COST |
(package private) static float |
DEFAULT_MOVE_COST_OFFPEAK |
private static String |
MAX_MOVES_PERCENT_KEY |
private float |
maxMovesPercent |
private static String |
MOVE_COST_KEY |
private static String |
MOVE_COST_OFFPEAK_KEY |
private float |
moveCost |
private float |
moveCostOffPeak |
private OffPeakHours |
offPeakHours |
cluster, COST_EPSILON
Constructor and Description |
---|
MoveCostFunction(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
protected 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.
|
getMultiplier, isNeeded, postAction, regionMoved, scale, setMultiplier, updateWeight
private static final String MOVE_COST_KEY
private static final String MOVE_COST_OFFPEAK_KEY
private static final String MAX_MOVES_PERCENT_KEY
static final float DEFAULT_MOVE_COST
static final float DEFAULT_MOVE_COST_OFFPEAK
private static final int DEFAULT_MAX_MOVES
private static final float DEFAULT_MAX_MOVE_PERCENT
private final float maxMovesPercent
private final OffPeakHours offPeakHours
private final float moveCost
private final float moveCostOffPeak
MoveCostFunction(org.apache.hadoop.conf.Configuration conf)
void prepare(BalancerClusterState cluster)
CostFunction
prepare
in class CostFunction
protected double cost()
cost
in class CostFunction
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.