Uses of Class
org.apache.hadoop.hbase.master.balancer.BalancerClusterState
-
Uses of BalancerClusterState in org.apache.hadoop.hbase.master.balancer
Modifier and TypeMethodDescriptionprivate BalancerClusterState
BaseLoadBalancer.createCluster
(List<ServerName> servers, Collection<RegionInfo> regions) Modifier and TypeMethodDescriptionprivate boolean
StochasticLoadBalancer.areSomeRegionReplicasColocated
(BalancerClusterState c) private long
StochasticLoadBalancer.calculateMaxSteps
(BalancerClusterState cluster) (package private) double
StochasticLoadBalancer.computeCost
(BalancerClusterState cluster, double previousCost) This is the main cost function.private List<RegionPlan>
StochasticLoadBalancer.createRegionPlans
(BalancerClusterState cluster) Create all of the RegionPlan's needed to move from the initial cluster state to the desired state.protected BalanceAction
CacheAwareLoadBalancer.CacheAwareCandidateGenerator.generate
(BalancerClusterState cluster) (package private) abstract BalanceAction
CandidateGenerator.generate
(BalancerClusterState cluster) (package private) BalanceAction
FavoredStochasticBalancer.FavoredNodeLoadPicker.generate
(BalancerClusterState cluster) protected BalanceAction
FavoredStochasticBalancer.FavoredNodeLocalityPicker.generate
(BalancerClusterState cluster) (package private) BalanceAction
LoadCandidateGenerator.generate
(BalancerClusterState cluster) (package private) BalanceAction
LocalityBasedCandidateGenerator.generate
(BalancerClusterState cluster) (package private) BalanceAction
RandomCandidateGenerator.generate
(BalancerClusterState cluster) (package private) BalanceAction
RegionReplicaCandidateGenerator.generate
(BalancerClusterState cluster) (package private) BalanceAction
RegionReplicaRackCandidateGenerator.generate
(BalancerClusterState cluster) private BalanceAction
CacheAwareLoadBalancer.CacheAwareCandidateGenerator.generatePlan
(BalancerClusterState cluster, int regionIndex, int currentServerIndex, float cacheRatioOnCurrentServer, int oldServerIndex, float cacheRatioOnOldServer) private int
FavoredStochasticBalancer.FavoredNodeLocalityPicker.getDifferentFavoredNode
(BalancerClusterState cluster, List<ServerName> favoredNodes, int currentServer) protected final long
RegionReplicaGroupingCostFunction.getMaxCost
(BalancerClusterState cluster) private RegionInfo
CacheAwareLoadBalancer.getRegionInfoByEncodedName
(BalancerClusterState cluster, String regionName) private double
LocalityBasedCandidateGenerator.getWeightedLocality
(BalancerClusterState cluster, int region, int server) protected final boolean
BaseLoadBalancer.idleRegionServerExist
(BalancerClusterState c) (package private) void
StochasticLoadBalancer.initCosts
(BalancerClusterState cluster) private boolean
CacheAwareLoadBalancer.CacheAwareCandidateGenerator.moveRegionToOldServer
(BalancerClusterState cluster, int regionIndex, int currentServerIndex, float cacheRatioOnCurrentServer, int oldServerIndex, float cacheRatioOnOldServer) private boolean
SimpleLoadBalancer.needsBalance
(BalancerClusterState c) (package private) boolean
StochasticLoadBalancer.needsBalance
(TableName tableName, BalancerClusterState cluster) (package private) BalanceAction
StochasticLoadBalancer.nextAction
(BalancerClusterState cluster) private int
CacheAwareLoadBalancer.CacheAwareSkewnessCandidateGenerator.pickLeastCachedRegion
(BalancerClusterState cluster, int thisServer) private int
FavoredStochasticBalancer.FavoredNodeLoadPicker.pickLeastLoadedFNServer
(BalancerClusterState cluster, List<ServerName> favoredNodes, int currentServerIndex) private int
FavoredStochasticBalancer.FavoredNodeLoadPicker.pickLeastLoadedServer
(BalancerClusterState cluster, int thisServer) private int
LoadCandidateGenerator.pickLeastLoadedServer
(BalancerClusterState cluster, int thisServer) private int
FavoredStochasticBalancer.FavoredNodeLocalityPicker.pickLowestLocalRegionOnServer
(BalancerClusterState cluster, int server) private int
FavoredStochasticBalancer.FavoredNodeLoadPicker.pickMostLoadedServer
(BalancerClusterState cluster) private int
LoadCandidateGenerator.pickMostLoadedServer
(BalancerClusterState cluster, int thisServer) (package private) int
CandidateGenerator.pickOtherRandomRack
(BalancerClusterState cluster, int rackIndex) (package private) int
CandidateGenerator.pickOtherRandomServer
(BalancerClusterState cluster, int serverIndex) (package private) int
CandidateGenerator.pickRandomRack
(BalancerClusterState cluster) (package private) int
CandidateGenerator.pickRandomRegion
(BalancerClusterState cluster, int server, double chanceOfNoSwap) From a list of regions pick a random one.(package private) BalanceAction
CacheAwareLoadBalancer.CacheAwareSkewnessCandidateGenerator.pickRandomRegions
(BalancerClusterState cluster, int thisServer, int otherServer) (package private) BalanceAction
CandidateGenerator.pickRandomRegions
(BalancerClusterState cluster, int thisServer, int otherServer) (package private) int
CandidateGenerator.pickRandomServer
(BalancerClusterState cluster) (package private) void
CacheAwareLoadBalancer.CacheAwareCostFunction.prepare
(BalancerClusterState cluster) (package private) void
CacheAwareLoadBalancer.CacheAwareRegionSkewnessCostFunction.prepare
(BalancerClusterState cluster) (package private) void
CostFromRegionLoadFunction.prepare
(BalancerClusterState cluster) (package private) void
CostFunction.prepare
(BalancerClusterState cluster) Called once per LB invocation to give the cost function to initialize it's state, and perform any costly calculation.(package private) void
HeterogeneousRegionCountCostFunction.prepare
(BalancerClusterState cluster) Called once per LB invocation to give the cost function to initialize it's state, and perform any costly calculation.(package private) void
LocalityBasedCostFunction.prepare
(BalancerClusterState cluster) (package private) void
MoveCostFunction.prepare
(BalancerClusterState cluster) (package private) void
PrimaryRegionCountSkewCostFunction.prepare
(BalancerClusterState cluster) (package private) void
RegionCountSkewCostFunction.prepare
(BalancerClusterState cluster) (package private) final void
RegionReplicaGroupingCostFunction.prepare
(BalancerClusterState cluster) (package private) void
TableSkewCostFunction.prepare
(BalancerClusterState cluster) private ServerName
BaseLoadBalancer.randomAssignment
(BalancerClusterState cluster, RegionInfo regionInfo, List<ServerName> servers) Used to assign a single region to a random server.private void
BaseLoadBalancer.roundRobinAssignment
(BalancerClusterState cluster, List<RegionInfo> regions, List<ServerName> servers, Map<ServerName, List<RegionInfo>> assignments) Round-robin a list of regions to a list of serversprivate Optional<BalanceAction>
LocalityBasedCandidateGenerator.tryMoveOrSwap
(BalancerClusterState cluster, int fromServer, int fromRegion, int toServer) (package private) void
StochasticLoadBalancer.updateCostsAndWeightsWithAction
(BalancerClusterState cluster, BalanceAction action)