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<HRegionInfo> regions) |
Modifier and Type | Method and Description |
---|---|
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 boolean |
StochasticLoadBalancer.areSomeRegionReplicasColocated(BaseLoadBalancer.Cluster c) |
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) |
(package private) long |
StochasticLoadBalancer.RegionReplicaHostCostFunction.getMaxCost(BaseLoadBalancer.Cluster cluster) |
(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.RegionReplicaHostCostFunction.init(BaseLoadBalancer.Cluster cluster) |
(package private) void |
StochasticLoadBalancer.RegionReplicaRackCostFunction.init(BaseLoadBalancer.Cluster cluster) |
protected void |
StochasticLoadBalancer.initCosts(BaseLoadBalancer.Cluster cluster) |
protected boolean |
BaseLoadBalancer.needsBalance(BaseLoadBalancer.Cluster c) |
(package private) BaseLoadBalancer.Cluster.Action |
StochasticLoadBalancer.nextAction(BaseLoadBalancer.Cluster cluster) |
private int |
StochasticLoadBalancer.LoadCandidateGenerator.pickLeastLoadedServer(BaseLoadBalancer.Cluster cluster,
int thisServer) |
private int |
StochasticLoadBalancer.LocalityBasedCandidateGenerator.pickLowestLocalityRegionOnServer(BaseLoadBalancer.Cluster cluster,
int server) |
private int |
StochasticLoadBalancer.LocalityBasedCandidateGenerator.pickLowestLocalityServer(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,
HRegionInfo regionInfo,
List<ServerName> servers)
Used to assign a single region to a random server.
|
private void |
BaseLoadBalancer.roundRobinAssignment(BaseLoadBalancer.Cluster cluster,
List<HRegionInfo> regions,
List<HRegionInfo> unassignedRegions,
List<ServerName> servers,
Map<ServerName,List<HRegionInfo>> assignments)
Round robin a list of regions to a list of servers
|
protected void |
StochasticLoadBalancer.updateCostsWithAction(BaseLoadBalancer.Cluster cluster,
BaseLoadBalancer.Cluster.Action action) |
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.