public class VerifyingRSGroupAdminClient extends RSGroupAdmin
| Constructor and Description |
|---|
VerifyingRSGroupAdminClient(RSGroupAdmin RSGroupAdmin,
Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRSGroup(String groupName)
Add a new group
|
boolean |
balanceRSGroup(String name)
Balance the regions in a group
|
void |
close() |
RSGroupInfo |
getRSGroupInfo(String groupName)
Gets the regionserver group information.
|
RSGroupInfo |
getRSGroupInfoOfTable(TableName tableName)
Gets the regionserver group info of table.
|
RSGroupInfo |
getRSGroupOfServer(HostAndPort hostPort)
Retrieve the RSGroupInfo a server is affiliated to
|
List<RSGroupInfo> |
listRSGroups()
Lists the existing groups.
|
void |
moveServers(Set<HostAndPort> servers,
String targetGroup)
Move a set of serves to another group
|
void |
moveTables(Set<TableName> tables,
String targetGroup)
Move tables to a new group.
|
void |
removeRSGroup(String name)
Remove a regionserver group
|
void |
verify() |
newClientpublic VerifyingRSGroupAdminClient(RSGroupAdmin RSGroupAdmin, Configuration conf) throws IOException
IOExceptionpublic void addRSGroup(String groupName) throws IOException
RSGroupAdminaddRSGroup in class RSGroupAdmingroupName - name of the groupIOException - on failure to add grouppublic RSGroupInfo getRSGroupInfo(String groupName) throws IOException
RSGroupAdmingetRSGroupInfo in class RSGroupAdmingroupName - the group nameIOExceptionpublic RSGroupInfo getRSGroupInfoOfTable(TableName tableName) throws IOException
RSGroupAdmingetRSGroupInfoOfTable in class RSGroupAdmintableName - the table nameIOExceptionpublic void moveServers(Set<HostAndPort> servers, String targetGroup) throws IOException
RSGroupAdminmoveServers in class RSGroupAdminservers - set of servers, must be in the form HOST:PORTtargetGroup - the target groupIOException - Signals that an I/O exception has occurred.public void moveTables(Set<TableName> tables, String targetGroup) throws IOException
RSGroupAdminmoveTables in class RSGroupAdmintables - list of tables to movetargetGroup - target groupIOException - on failure to move tablespublic void removeRSGroup(String name) throws IOException
RSGroupAdminremoveRSGroup in class RSGroupAdminname - name of the groupIOException - on failure to remove grouppublic boolean balanceRSGroup(String name) throws IOException
RSGroupAdminbalanceRSGroup in class RSGroupAdminname - the name of the group to balanceIOException - on unexpected failure to balance grouppublic List<RSGroupInfo> listRSGroups() throws IOException
RSGroupAdminlistRSGroups in class RSGroupAdminIOExceptionpublic RSGroupInfo getRSGroupOfServer(HostAndPort hostPort) throws IOException
RSGroupAdmingetRSGroupOfServer in class RSGroupAdminhostPort - HostPort to get RSGroupInfo forIOException - on unexpected failure to retrieve GroupInfopublic void verify()
throws IOException
IOExceptionpublic void close()
throws IOException
IOException