public abstract static class StochasticLoadBalancer.CostFunction extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BaseLoadBalancer.Cluster |
cluster |
static double |
COST_EPSILON |
| Constructor and Description |
|---|
CostFunction(org.apache.hadoop.conf.Configuration c) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract double |
cost() |
protected void |
regionMoved(int region,
int oldServer,
int newServer) |
void |
updateWeight(double[] weights)
Add the cost of this cost function to the weight of the candidate generator that is optimized
for this cost function.
|
public static final double COST_EPSILON
protected BaseLoadBalancer.Cluster cluster
protected void regionMoved(int region,
int oldServer,
int newServer)
protected abstract double cost()
public void updateWeight(double[] weights)
weights - the weights for every generator.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.