org.apache.hadoop.hbase.master.balancer
Class StochasticLoadBalancer.LoadPicker
java.lang.Object
org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer.LoadPicker
- Enclosing class:
- StochasticLoadBalancer
public static class StochasticLoadBalancer.LoadPicker
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StochasticLoadBalancer.LoadPicker
public StochasticLoadBalancer.LoadPicker()
pickRandomRegion
protected int pickRandomRegion(BaseLoadBalancer.Cluster cluster,
int server,
double chanceOfNoSwap)
- From a list of regions pick a random one. Null can be returned which
StochasticLoadBalancer.balanceCluster(Map)
recognize as signal to try a region move
rather than swap.
- Parameters:
cluster
- The state of the clusterserver
- index of the serverchanceOfNoSwap
- Chance that this will decide to try a move rather
than a swap.
- Returns:
- a random
HRegionInfo
or null if an asymmetrical move is
suggested.
pickRandomServer
protected int pickRandomServer(BaseLoadBalancer.Cluster cluster)
pickOtherRandomServer
protected int pickOtherRandomServer(BaseLoadBalancer.Cluster cluster,
int serverIndex)
pickRandomRegions
protected Pair<Integer,Integer> pickRandomRegions(BaseLoadBalancer.Cluster cluster,
int thisServer,
int otherServer)
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.