public abstract static class StochasticLoadBalancer.CostFunction extends Object
| Modifier and Type | Field and Description |
|---|---|
protected BaseLoadBalancer.Cluster |
cluster |
| Constructor and Description |
|---|
StochasticLoadBalancer.CostFunction(org.apache.hadoop.conf.Configuration c) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract double |
cost() |
protected double |
costFromArray(double[] stats)
Function to compute a scaled cost using
DescriptiveStatistics. |
protected void |
regionMoved(int region,
int oldServer,
int newServer) |
protected double |
scale(double min,
double max,
double value)
Scale the value between 0 and 1.
|
protected BaseLoadBalancer.Cluster cluster
public StochasticLoadBalancer.CostFunction(org.apache.hadoop.conf.Configuration c)
protected void regionMoved(int region,
int oldServer,
int newServer)
protected abstract double cost()
protected double costFromArray(double[] stats)
DescriptiveStatistics. It
assumes that this is a zero sum set of costs. It assumes that the worst case
possible is all of the elements in one region server and the rest having 0.stats - the costsprotected double scale(double min,
double max,
double value)
min - Min valuemax - The Max valuevalue - The value to be scaled.Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.