Package org.apache.hadoop.hbase.rsgroup
Class RSGroupAdminClient
java.lang.Object
org.apache.hadoop.hbase.rsgroup.RSGroupAdminClient
- All Implemented Interfaces:
RSGroupAdmin
Client used for managing region server group information.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRSGroup(String groupName) Creates a new RegionServer group with the given name.balanceRSGroup(String groupName, BalanceRequest request) Balance regions in the given RegionServer group, running based on the givenBalanceRequest.getRSGroupInfo(String groupName) GetsRSGroupInfofor given group name.getRSGroupInfoOfTable(TableName tableName) GetsRSGroupInfofor the given table's group.getRSGroupOfServer(Address hostPort) Retrieve the RSGroupInfo a server is affiliated toLists current set of RegionServer groups.voidmoveServers(Set<Address> servers, String targetGroup) Move given set of servers to the specified target RegionServer group.voidMove given set of servers and tables to the specified target RegionServer group.voidmoveTables(Set<TableName> tables, String targetGroup) Move given set of tables to the specified target RegionServer group.voidremoveRSGroup(String name) Removes RegionServer group associated with the given name.voidremoveServers(Set<Address> servers) Remove decommissioned servers from rsgroup.voidrenameRSGroup(String oldName, String newName) Rename rsgroup.voidupdateConfiguration(String groupName) Update the configuration and trigger an online config change on all the regionservers in the RSGroup.voidupdateRSGroupConfig(String groupName, Map<String, String> configuration) Update RSGroup configurationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.rsgroup.RSGroupAdmin
balanceRSGroup
-
Field Details
-
stub
private org.apache.hadoop.hbase.protobuf.generated.RSGroupAdminProtos.RSGroupAdminService.BlockingInterface stub -
admin
-
-
Constructor Details
-
RSGroupAdminClient
- Throws:
IOException
-
-
Method Details
-
getRSGroupInfo
Description copied from interface:RSGroupAdminGetsRSGroupInfofor given group name.- Specified by:
getRSGroupInfoin interfaceRSGroupAdmin- Throws:
IOException
-
getRSGroupInfoOfTable
Description copied from interface:RSGroupAdminGetsRSGroupInfofor the given table's group.- Specified by:
getRSGroupInfoOfTablein interfaceRSGroupAdmin- Throws:
IOException
-
moveServers
Description copied from interface:RSGroupAdminMove given set of servers to the specified target RegionServer group.- Specified by:
moveServersin interfaceRSGroupAdmin- Throws:
IOException
-
moveTables
Description copied from interface:RSGroupAdminMove 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.- Specified by:
moveTablesin interfaceRSGroupAdmin- Throws:
IOException
-
addRSGroup
Description copied from interface:RSGroupAdminCreates a new RegionServer group with the given name.- Specified by:
addRSGroupin interfaceRSGroupAdmin- Throws:
IOException
-
removeRSGroup
Description copied from interface:RSGroupAdminRemoves RegionServer group associated with the given name.- Specified by:
removeRSGroupin interfaceRSGroupAdmin- Throws:
IOException
-
balanceRSGroup
Description copied from interface:RSGroupAdminBalance regions in the given RegionServer group, running based on the givenBalanceRequest.- Specified by:
balanceRSGroupin interfaceRSGroupAdmin- Returns:
- boolean Whether balance ran or not
- Throws:
IOException
-
listRSGroups
Description copied from interface:RSGroupAdminLists current set of RegionServer groups.- Specified by:
listRSGroupsin interfaceRSGroupAdmin- Throws:
IOException
-
getRSGroupOfServer
Description copied from interface:RSGroupAdminRetrieve the RSGroupInfo a server is affiliated to- Specified by:
getRSGroupOfServerin interfaceRSGroupAdmin- Parameters:
hostPort- HostPort to get RSGroupInfo for- Throws:
IOException
-
moveServersAndTables
public void moveServersAndTables(Set<Address> servers, Set<TableName> tables, String targetGroup) throws IOException Description copied from interface:RSGroupAdminMove given set of servers and tables to the specified target RegionServer group.- Specified by:
moveServersAndTablesin interfaceRSGroupAdmin- 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
Description copied from interface:RSGroupAdminRemove 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.- Specified by:
removeServersin interfaceRSGroupAdmin- Parameters:
servers- set of servers to remove- Throws:
IOException
-
renameRSGroup
Description copied from interface:RSGroupAdminRename rsgroup.- Specified by:
renameRSGroupin interfaceRSGroupAdmin- Parameters:
oldName- old rsgroup namenewName- new rsgroup name- Throws:
IOException
-
updateRSGroupConfig
public void updateRSGroupConfig(String groupName, Map<String, String> configuration) throws IOExceptionDescription copied from interface:RSGroupAdminUpdate RSGroup configuration- Specified by:
updateRSGroupConfigin interfaceRSGroupAdmin- Parameters:
groupName- the group nameconfiguration- new configuration of the group name to be set- Throws:
IOException- if a remote or network exception occurs
-
updateConfiguration
Description copied from interface:RSGroupAdminUpdate the configuration and trigger an online config change on all the regionservers in the RSGroup.- Specified by:
updateConfigurationin interfaceRSGroupAdmin- Parameters:
groupName- the group name- Throws:
IOException- if a remote or network exception occurs
-