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