static class StochasticLoadBalancer.RegionReplicaRackCostFunction extends StochasticLoadBalancer.RegionReplicaHostCostFunction
| Modifier and Type | Field and Description |
|---|---|
private static float |
DEFAULT_REGION_REPLICA_RACK_COST_KEY |
private static String |
REGION_REPLICA_RACK_COST_KEY |
costsPerGroup, maxCost, primariesOfRegionsPerGroupcluster| Constructor and Description |
|---|
RegionReplicaRackCostFunction(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
init(BaseLoadBalancer.Cluster 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) |
cost, costPerGroup, getMaxCost, isNeededcostFromArray, getMultiplier, postAction, scale, setMultiplierprivate static final String REGION_REPLICA_RACK_COST_KEY
private static final float DEFAULT_REGION_REPLICA_RACK_COST_KEY
public RegionReplicaRackCostFunction(org.apache.hadoop.conf.Configuration conf)
void init(BaseLoadBalancer.Cluster cluster)
StochasticLoadBalancer.CostFunctioninit in class StochasticLoadBalancer.RegionReplicaHostCostFunctionprotected void regionMoved(int region, int oldServer, int newServer)
regionMoved in class StochasticLoadBalancer.RegionReplicaHostCostFunctionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.