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() |
newClient
public VerifyingRSGroupAdminClient(RSGroupAdmin RSGroupAdmin, Configuration conf) throws IOException
IOException
public void addRSGroup(String groupName) throws IOException
RSGroupAdmin
addRSGroup
in class RSGroupAdmin
groupName
- name of the groupIOException
- on failure to add grouppublic RSGroupInfo getRSGroupInfo(String groupName) throws IOException
RSGroupAdmin
getRSGroupInfo
in class RSGroupAdmin
groupName
- the group nameIOException
public RSGroupInfo getRSGroupInfoOfTable(TableName tableName) throws IOException
RSGroupAdmin
getRSGroupInfoOfTable
in class RSGroupAdmin
tableName
- the table nameIOException
public void moveServers(Set<HostAndPort> servers, String targetGroup) throws IOException
RSGroupAdmin
moveServers
in class RSGroupAdmin
servers
- 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
RSGroupAdmin
moveTables
in class RSGroupAdmin
tables
- list of tables to movetargetGroup
- target groupIOException
- on failure to move tablespublic void removeRSGroup(String name) throws IOException
RSGroupAdmin
removeRSGroup
in class RSGroupAdmin
name
- name of the groupIOException
- on failure to remove grouppublic boolean balanceRSGroup(String name) throws IOException
RSGroupAdmin
balanceRSGroup
in class RSGroupAdmin
name
- the name of the group to balanceIOException
- on unexpected failure to balance grouppublic List<RSGroupInfo> listRSGroups() throws IOException
RSGroupAdmin
listRSGroups
in class RSGroupAdmin
IOException
public RSGroupInfo getRSGroupOfServer(HostAndPort hostPort) throws IOException
RSGroupAdmin
getRSGroupOfServer
in class RSGroupAdmin
hostPort
- HostPort to get RSGroupInfo forIOException
- on unexpected failure to retrieve GroupInfopublic void verify() throws IOException
IOException
public void close() throws IOException
IOException