@InterfaceAudience.Private public abstract class RSGroupAdmin extends Object implements Closeable
| Constructor and Description |
|---|
RSGroupAdmin() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addRSGroup(String name)
Add a new group
|
abstract boolean |
balanceRSGroup(String name)
Balance the regions in a group
|
abstract RSGroupInfo |
getRSGroupInfo(String groupName)
Gets the regionserver group information.
|
abstract RSGroupInfo |
getRSGroupInfoOfTable(TableName tableName)
Gets the regionserver group info of table.
|
abstract RSGroupInfo |
getRSGroupOfServer(HostAndPort hostPort)
Retrieve the RSGroupInfo a server is affiliated to
|
abstract List<RSGroupInfo> |
listRSGroups()
Lists the existing groups.
|
abstract void |
moveServers(Set<HostAndPort> servers,
String targetGroup)
Move a set of serves to another group
|
abstract void |
moveTables(Set<TableName> tables,
String targetGroup)
Move tables to a new group.
|
static RSGroupAdmin |
newClient(Connection conn)
Create a new RSGroupAdmin client
|
abstract void |
removeRSGroup(String name)
Remove a regionserver group
|
public static RSGroupAdmin newClient(Connection conn) throws IOException
conn - connection RSGroupAdmin instance will useIOException - on failure to create new clientpublic abstract RSGroupInfo getRSGroupInfo(String groupName) throws IOException
groupName - the group nameIOExceptionpublic abstract RSGroupInfo getRSGroupInfoOfTable(TableName tableName) throws IOException
tableName - the table nameIOExceptionpublic abstract void moveServers(Set<HostAndPort> servers, String targetGroup) throws IOException
servers - set of servers, must be in the form HOST:PORTtargetGroup - the target groupIOException - Signals that an I/O exception has occurred.public abstract void moveTables(Set<TableName> tables, String targetGroup) throws IOException
tables - list of tables to movetargetGroup - target groupIOException - on failure to move tablespublic abstract void addRSGroup(String name) throws IOException
name - name of the groupIOException - on failure to add grouppublic abstract void removeRSGroup(String name) throws IOException
name - name of the groupIOException - on failure to remove grouppublic abstract boolean balanceRSGroup(String name) throws IOException
name - the name of the group to balanceIOException - on unexpected failure to balance grouppublic abstract List<RSGroupInfo> listRSGroups() throws IOException
IOExceptionpublic abstract RSGroupInfo getRSGroupOfServer(HostAndPort hostPort) throws IOException
hostPort - HostPort to get RSGroupInfo forIOException - on unexpected failure to retrieve GroupInfo