@InterfaceAudience.LimitedPrivate(value="Configuration") public class SimpleLoadBalancer extends BaseLoadBalancer
Cluster-wide load balancing will occur only when there are no regions in
transition and according to a fixed period of a time using balanceCluster(Map)
.
Inline region placement with BaseLoadBalancer.immediateAssignment(java.util.List<org.apache.hadoop.hbase.HRegionInfo>, java.util.List<org.apache.hadoop.hbase.ServerName>)
can be used when
the Master needs to handle closed regions that it currently does not have
a destination set for. This can happen during master failover.
On cluster startup, bulk assignment can be used to determine locations for all Regions in a cluster.
This classes produces plans for the
AssignmentManager
to execute.
BaseLoadBalancer.Cluster
clusterStatus, config, masterServerName, metricsBalancer, rackManager, regionFinder, services, slop, TABLES_ON_MASTER, tablesOnMaster
Constructor and Description |
---|
SimpleLoadBalancer() |
Modifier and Type | Method and Description |
---|---|
List<RegionPlan> |
balanceCluster(Map<ServerName,List<HRegionInfo>> clusterMap)
Generate a global load balancing plan according to the specified map of
server information to the most loaded regions of each server.
|
areSomeRegionReplicasColocated, assignMasterRegions, balanceMasterRegions, createCluster, getConf, getRegionAssignmentsByServer, getTablesOnMaster, immediateAssignment, initialize, isStopped, needsBalance, onConfigurationChange, randomAssignment, regionOffline, regionOnline, retainAssignment, roundRobinAssignment, setClusterStatus, setConf, setMasterServices, setRackManager, setSlop, shouldBeOnMaster, stop, tablesOnMaster
public List<RegionPlan> balanceCluster(Map<ServerName,List<HRegionInfo>> clusterMap)
Order the regions to move from most recent to least.
clusterMap
- Map of regionservers and their load/region information to
a list of their most loaded regionsCopyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.