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, primariesOfRegionsPerGroup
cluster
Constructor and Description |
---|
StochasticLoadBalancer.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
costFromArray, getMultiplier, postAction, scale, setMultiplier
private static final String REGION_REPLICA_RACK_COST_KEY
private static final float DEFAULT_REGION_REPLICA_RACK_COST_KEY
public StochasticLoadBalancer.RegionReplicaRackCostFunction(org.apache.hadoop.conf.Configuration conf)
void init(BaseLoadBalancer.Cluster cluster)
StochasticLoadBalancer.CostFunction
init
in class StochasticLoadBalancer.RegionReplicaHostCostFunction
protected void regionMoved(int region, int oldServer, int newServer)
regionMoved
in class StochasticLoadBalancer.RegionReplicaHostCostFunction
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.