static class StochasticLoadBalancer.LocalityBasedCandidateGenerator extends StochasticLoadBalancer.CandidateGenerator
Modifier and Type | Field and Description |
---|---|
private MasterServices |
masterServices |
Constructor and Description |
---|
LocalityBasedCandidateGenerator(MasterServices masterServices) |
Modifier and Type | Method and Description |
---|---|
(package private) BaseLoadBalancer.Cluster.Action |
generate(BaseLoadBalancer.Cluster cluster) |
private double |
getWeightedLocality(BaseLoadBalancer.Cluster cluster,
int region,
int server) |
(package private) void |
setServices(MasterServices services) |
private org.apache.hbase.thirdparty.com.google.common.base.Optional<BaseLoadBalancer.Cluster.Action> |
tryMoveOrSwap(BaseLoadBalancer.Cluster cluster,
int fromServer,
int fromRegion,
int toServer)
Try to generate a move/swap fromRegion between fromServer and toServer such that locality is improved.
|
getAction, getRandomIterationOrder, pickOtherRandomRack, pickOtherRandomServer, pickRandomRack, pickRandomRegion, pickRandomRegions, pickRandomServer
private MasterServices masterServices
LocalityBasedCandidateGenerator(MasterServices masterServices)
BaseLoadBalancer.Cluster.Action generate(BaseLoadBalancer.Cluster cluster)
generate
in class StochasticLoadBalancer.CandidateGenerator
private org.apache.hbase.thirdparty.com.google.common.base.Optional<BaseLoadBalancer.Cluster.Action> tryMoveOrSwap(BaseLoadBalancer.Cluster cluster, int fromServer, int fromRegion, int toServer)
private double getWeightedLocality(BaseLoadBalancer.Cluster cluster, int region, int server)
void setServices(MasterServices services)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.