@InterfaceAudience.Private public class RSGroupBasedLoadBalancer extends Object implements RSGroupableBalancer
HBASE_RSGROUP_LOADBALANCER_CLASSBOGUS_SERVER_NAME, SYSTEM_TABLES_ON_MASTER, TABLES_ON_MASTER| Constructor and Description |
|---|
RSGroupBasedLoadBalancer()
Used by reflection in
LoadBalancerFactory. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisMasterCanHostUserRegions, isSystemTablesOnlyOnMaster, isTablesOnMaster@InterfaceAudience.Private public RSGroupBasedLoadBalancer()
LoadBalancerFactory.public org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurablepublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurablepublic void setClusterMetrics(ClusterMetrics sm)
setClusterMetrics in interface LoadBalancerpublic void setMasterServices(MasterServices masterServices)
setMasterServices in interface LoadBalancerpublic List<RegionPlan> balanceCluster(TableName tableName, Map<ServerName,List<RegionInfo>> clusterState) throws HBaseIOException
balanceCluster in interface LoadBalancerHBaseIOExceptionpublic List<RegionPlan> balanceCluster(Map<ServerName,List<RegionInfo>> clusterState) throws HBaseIOException
balanceCluster in interface LoadBalancerHBaseIOExceptionpublic Map<ServerName,List<RegionInfo>> roundRobinAssignment(List<RegionInfo> regions, List<ServerName> servers) throws HBaseIOException
roundRobinAssignment in interface LoadBalancerHBaseIOExceptionpublic Map<ServerName,List<RegionInfo>> retainAssignment(Map<RegionInfo,ServerName> regions, List<ServerName> servers) throws HBaseIOException
retainAssignment in interface LoadBalancerHBaseIOExceptionpublic ServerName randomAssignment(RegionInfo region, List<ServerName> servers) throws HBaseIOException
randomAssignment in interface LoadBalancerHBaseIOExceptionpublic void initialize()
throws HBaseIOException
initialize in interface LoadBalancerHBaseIOExceptionpublic boolean isOnline()
public void setClusterLoad(Map<TableName,Map<ServerName,List<RegionInfo>>> clusterLoad)
setClusterLoad in interface LoadBalancerpublic void regionOnline(RegionInfo regionInfo, ServerName sn)
regionOnline in interface LoadBalancerpublic void regionOffline(RegionInfo regionInfo)
regionOffline in interface LoadBalancerpublic void onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
onConfigurationChange in interface ConfigurationObserveronConfigurationChange in interface LoadBalancerpublic void setRsGroupInfoManager(RSGroupInfoManager rsGroupInfoManager)
public void postMasterStartupInitialize()
postMasterStartupInitialize in interface LoadBalancerpublic void updateBalancerStatus(boolean status)
updateBalancerStatus in interface LoadBalancerCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.