Package | Description |
---|---|
org.apache.hadoop.hbase.master.balancer |
Modifier and Type | Field and Description |
---|---|
protected BaseLoadBalancer.Cluster |
StochasticLoadBalancer.CostFunction.cluster |
Modifier and Type | Method and Description |
---|---|
protected BaseLoadBalancer.Cluster |
BaseLoadBalancer.createCluster(List<ServerName> servers,
Collection<RegionInfo> regions) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
StochasticLoadBalancer.areSomeRegionReplicasColocated(BaseLoadBalancer.Cluster c) |
protected boolean |
BaseLoadBalancer.areSomeRegionReplicasColocated(BaseLoadBalancer.Cluster c)
Subclasses should implement this to return true if the cluster has nodes that hosts
multiple replicas for the same region, or, if there are multiple racks and the same
rack hosts replicas of the same region
|
protected double |
StochasticLoadBalancer.computeCost(BaseLoadBalancer.Cluster cluster,
double previousCost)
This is the main cost function.
|
private List<RegionPlan> |
StochasticLoadBalancer.createRegionPlans(BaseLoadBalancer.Cluster cluster)
Create all of the RegionPlan's needed to move from the initial cluster state to the desired
state.
|
(package private) abstract BaseLoadBalancer.Cluster.Action |
StochasticLoadBalancer.CandidateGenerator.generate(BaseLoadBalancer.Cluster cluster) |
(package private) BaseLoadBalancer.Cluster.Action |
StochasticLoadBalancer.RandomCandidateGenerator.generate(BaseLoadBalancer.Cluster cluster) |
(package private) BaseLoadBalancer.Cluster.Action |
StochasticLoadBalancer.LoadCandidateGenerator.generate(BaseLoadBalancer.Cluster cluster) |
(package private) BaseLoadBalancer.Cluster.Action |
StochasticLoadBalancer.LocalityBasedCandidateGenerator.generate(BaseLoadBalancer.Cluster cluster) |
(package private) BaseLoadBalancer.Cluster.Action |
StochasticLoadBalancer.RegionReplicaCandidateGenerator.generate(BaseLoadBalancer.Cluster cluster) |
(package private) BaseLoadBalancer.Cluster.Action |
StochasticLoadBalancer.RegionReplicaRackCandidateGenerator.generate(BaseLoadBalancer.Cluster cluster) |
protected BaseLoadBalancer.Cluster.Action |
FavoredStochasticBalancer.FavoredNodeLocalityPicker.generate(BaseLoadBalancer.Cluster cluster) |
(package private) BaseLoadBalancer.Cluster.Action |
FavoredStochasticBalancer.FavoredNodeLoadPicker.generate(BaseLoadBalancer.Cluster cluster) |
private int |
FavoredStochasticBalancer.FavoredNodeLocalityPicker.getDifferentFavoredNode(BaseLoadBalancer.Cluster cluster,
List<ServerName> favoredNodes,
int currentServer) |
(package private) long |
StochasticLoadBalancer.RegionReplicaHostCostFunction.getMaxCost(BaseLoadBalancer.Cluster cluster) |
private double |
StochasticLoadBalancer.LocalityBasedCandidateGenerator.getWeightedLocality(BaseLoadBalancer.Cluster cluster,
int region,
int server) |
(package private) void |
StochasticLoadBalancer.CostFunction.init(BaseLoadBalancer.Cluster cluster)
Called once per LB invocation to give the cost function
to initialize it's state, and perform any costly calculation.
|
(package private) void |
StochasticLoadBalancer.LocalityBasedCostFunction.init(BaseLoadBalancer.Cluster cluster) |
(package private) void |
StochasticLoadBalancer.RegionReplicaHostCostFunction.init(BaseLoadBalancer.Cluster cluster) |
(package private) void |
StochasticLoadBalancer.RegionReplicaRackCostFunction.init(BaseLoadBalancer.Cluster cluster) |
protected void |
StochasticLoadBalancer.initCosts(BaseLoadBalancer.Cluster cluster) |
protected boolean |
StochasticLoadBalancer.needsBalance(BaseLoadBalancer.Cluster cluster) |
protected boolean |
BaseLoadBalancer.needsBalance(BaseLoadBalancer.Cluster c) |
(package private) BaseLoadBalancer.Cluster.Action |
StochasticLoadBalancer.nextAction(BaseLoadBalancer.Cluster cluster) |
private int |
FavoredStochasticBalancer.FavoredNodeLoadPicker.pickLeastLoadedFNServer(BaseLoadBalancer.Cluster cluster,
List<ServerName> favoredNodes,
int currentServerIndex) |
private int |
StochasticLoadBalancer.LoadCandidateGenerator.pickLeastLoadedServer(BaseLoadBalancer.Cluster cluster,
int thisServer) |
private int |
FavoredStochasticBalancer.FavoredNodeLoadPicker.pickLeastLoadedServer(BaseLoadBalancer.Cluster cluster,
int thisServer) |
private int |
FavoredStochasticBalancer.FavoredNodeLocalityPicker.pickLowestLocalRegionOnServer(BaseLoadBalancer.Cluster cluster,
int server) |
private int |
FavoredStochasticBalancer.FavoredNodeLoadPicker.pickMostLoadedServer(BaseLoadBalancer.Cluster cluster) |
private int |
StochasticLoadBalancer.LoadCandidateGenerator.pickMostLoadedServer(BaseLoadBalancer.Cluster cluster,
int thisServer) |
protected int |
StochasticLoadBalancer.CandidateGenerator.pickOtherRandomRack(BaseLoadBalancer.Cluster cluster,
int rackIndex) |
protected int |
StochasticLoadBalancer.CandidateGenerator.pickOtherRandomServer(BaseLoadBalancer.Cluster cluster,
int serverIndex) |
protected int |
StochasticLoadBalancer.CandidateGenerator.pickRandomRack(BaseLoadBalancer.Cluster cluster) |
protected int |
StochasticLoadBalancer.CandidateGenerator.pickRandomRegion(BaseLoadBalancer.Cluster cluster,
int server,
double chanceOfNoSwap)
From a list of regions pick a random one.
|
protected BaseLoadBalancer.Cluster.Action |
StochasticLoadBalancer.CandidateGenerator.pickRandomRegions(BaseLoadBalancer.Cluster cluster,
int thisServer,
int otherServer) |
protected int |
StochasticLoadBalancer.CandidateGenerator.pickRandomServer(BaseLoadBalancer.Cluster cluster) |
private ServerName |
BaseLoadBalancer.randomAssignment(BaseLoadBalancer.Cluster cluster,
RegionInfo regionInfo,
List<ServerName> servers)
Used to assign a single region to a random server.
|
private void |
BaseLoadBalancer.roundRobinAssignment(BaseLoadBalancer.Cluster cluster,
List<RegionInfo> regions,
List<RegionInfo> unassignedRegions,
List<ServerName> servers,
Map<ServerName,List<RegionInfo>> assignments)
Round robin a list of regions to a list of servers
|
private org.apache.hbase.thirdparty.com.google.common.base.Optional<BaseLoadBalancer.Cluster.Action> |
StochasticLoadBalancer.LocalityBasedCandidateGenerator.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.
|
protected void |
StochasticLoadBalancer.updateCostsWithAction(BaseLoadBalancer.Cluster cluster,
BaseLoadBalancer.Cluster.Action action) |
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.