Package org.apache.hadoop.hbase.rsgroup
Interface RSGroupInfoManager
- All Known Implementing Classes:
DisabledRSGroupInfoManager
,RSGroupInfoManagerImpl
Interface used to manage RSGroupInfo storage. An implementation has the option to support offline
mode. See
RSGroupBasedLoadBalancer
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRSGroup
(RSGroupInfo rsGroupInfo) Add given RSGroupInfo to existing list of group infos.balanceRSGroup
(String groupName, BalanceRequest request) Balance a region server group.static RSGroupInfoManager
create
(MasterServices master) determineRSGroupInfoForTable
(TableName tableName) DetermineRSGroupInfo
for the given table.getRSGroup
(String groupName) GetsRSGroupInfo
for the given group name.getRSGroupForTable
(TableName tableName) GetRSGroupInfo
for the given table.getRSGroupOfServer
(Address serverHostPort) Gets the group info of server.boolean
isOnline()
Whether the manager is able to fully return group metadataList the existingRSGroupInfo
s.void
moveServers
(Set<Address> servers, String targetGroupName) Move servers to a new group.void
removeRSGroup
(String groupName) Remove a region server group.void
removeServers
(Set<Address> servers) Remove decommissioned servers from rsgroupvoid
renameRSGroup
(String oldName, String newName) Rename rsgroupvoid
setRSGroup
(Set<TableName> tables, String groupName) Set group for tables.void
start()
void
updateRSGroupConfig
(String groupName, Map<String, String> configuration) Update RSGroup configuration
-
Method Details
-
start
void start() -
addRSGroup
Add given RSGroupInfo to existing list of group infos.- Throws:
IOException
-
removeRSGroup
Remove a region server group.- Throws:
IOException
-
moveServers
Move servers to a new group.- Throws:
IOException
-
getRSGroupOfServer
Gets the group info of server.- Throws:
IOException
-
getRSGroup
GetsRSGroupInfo
for the given group name.- Throws:
IOException
-
listRSGroups
List the existingRSGroupInfo
s.- Throws:
IOException
-
isOnline
boolean isOnline()Whether the manager is able to fully return group metadata- Returns:
- whether the manager is in online mode
-
removeServers
Remove decommissioned servers from rsgroup- Parameters:
servers
- set of servers to remove- Throws:
IOException
-
getRSGroupForTable
GetRSGroupInfo
for the given table.- Throws:
IOException
-
create
- Throws:
IOException
-
balanceRSGroup
Balance a region server group.- Throws:
IOException
-
setRSGroup
Set group for tables.- Throws:
IOException
-
determineRSGroupInfoForTable
DetermineRSGroupInfo
for the given table.- Parameters:
tableName
- table name- Returns:
- rsgroup name
-
renameRSGroup
Rename rsgroup- Parameters:
oldName
- old rsgroup namenewName
- new rsgroup name- Throws:
IOException
-
updateRSGroupConfig
Update RSGroup configuration- Parameters:
groupName
- the group nameconfiguration
- new configuration of the group name to be set- Throws:
IOException
- if a remote or network exception occurs
-