Package org.apache.hadoop.hbase.rsgroup
Interface RSGroupAdmin
- All Known Implementing Classes:
RSGroupAdminClient
,RSGroupAdminServer
Group user API interface used between client and server.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRSGroup
(String groupName) Creates a new RegionServer group with the given name.default BalanceResponse
balanceRSGroup
(String groupName) Balance regions in the given RegionServer group.balanceRSGroup
(String groupName, BalanceRequest request) Balance regions in the given RegionServer group, running based on the givenBalanceRequest
.getRSGroupInfo
(String groupName) GetsRSGroupInfo
for given group name.getRSGroupInfoOfTable
(TableName tableName) GetsRSGroupInfo
for the given table's group.getRSGroupOfServer
(Address hostPort) Retrieve the RSGroupInfo a server is affiliated toLists current set of RegionServer groups.void
moveServers
(Set<Address> servers, String targetGroup) Move given set of servers to the specified target RegionServer group.void
Move given set of servers and tables to the specified target RegionServer group.void
moveTables
(Set<TableName> tables, String targetGroup) Move given set of tables to the specified target RegionServer group.void
removeRSGroup
(String groupName) Removes RegionServer group associated with the given name.void
removeServers
(Set<Address> servers) Remove decommissioned servers from rsgroup.void
renameRSGroup
(String oldName, String newName) Rename rsgroup.void
updateConfiguration
(String groupName) Update the configuration and trigger an online config change on all the regionservers in the RSGroup.void
updateRSGroupConfig
(String groupName, Map<String, String> configuration) Update RSGroup configuration
-
Method Details
-
getRSGroupInfo
GetsRSGroupInfo
for given group name.- Throws:
IOException
-
getRSGroupInfoOfTable
GetsRSGroupInfo
for the given table's group.- Throws:
IOException
-
moveServers
Move given set of servers to the specified target RegionServer group.- Throws:
IOException
-
moveTables
Move given set of tables to the specified target RegionServer group. This will unassign all of a table's region so it can be reassigned to the correct group.- Throws:
IOException
-
addRSGroup
Creates a new RegionServer group with the given name.- Throws:
IOException
-
removeRSGroup
Removes RegionServer group associated with the given name.- Throws:
IOException
-
balanceRSGroup
Balance regions in the given RegionServer group.- Returns:
- boolean Whether balance ran or not
- Throws:
IOException
-
balanceRSGroup
Balance regions in the given RegionServer group, running based on the givenBalanceRequest
.- Returns:
- boolean Whether balance ran or not
- Throws:
IOException
-
listRSGroups
Lists current set of RegionServer groups.- Throws:
IOException
-
getRSGroupOfServer
Retrieve the RSGroupInfo a server is affiliated to- Parameters:
hostPort
- HostPort to get RSGroupInfo for- Throws:
IOException
-
moveServersAndTables
void moveServersAndTables(Set<Address> servers, Set<TableName> tables, String targetGroup) throws IOException Move given set of servers and tables to the specified target RegionServer group.- Parameters:
servers
- set of servers to movetables
- set of tables to movetargetGroup
- the target group name- Throws:
IOException
- if moving the server and tables fail
-
removeServers
Remove decommissioned servers from rsgroup. 1. Sometimes we may find the server aborted due to some hardware failure and we must offline the server for repairing. Or we need to move some servers to join other clusters. So we need to remove these servers from the rsgroup. 2. Dead/recovering/live servers will be disallowed.- Parameters:
servers
- set of servers to remove- Throws:
IOException
-
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
-
updateConfiguration
Update the configuration and trigger an online config change on all the regionservers in the RSGroup.- Parameters:
groupName
- the group name- Throws:
IOException
- if a remote or network exception occurs
-