@InterfaceAudience.Private public class RSGroupAdminServer extends RSGroupAdmin
| Constructor and Description |
|---|
RSGroupAdminServer(MasterServices master,
RSGroupInfoManager RSGroupInfoManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRSGroup(java.lang.String name)
Add a new group
|
boolean |
balanceRSGroup(java.lang.String groupName)
Balance the regions in a group
|
void |
cleanupRSGroupForTable(TableName tableName) |
void |
close() |
RSGroupInfo |
getRSGroupInfo(java.lang.String groupName)
Gets the regionserver group information.
|
RSGroupInfoManager |
getRSGroupInfoManager() |
RSGroupInfo |
getRSGroupInfoOfTable(TableName tableName)
Gets the regionserver group info of table.
|
RSGroupInfo |
getRSGroupOfServer(HostAndPort hostPort)
Retrieve the RSGroupInfo a server is affiliated to
|
java.util.List<RSGroupInfo> |
listRSGroups()
Lists the existing groups.
|
void |
moveServers(java.util.Set<HostAndPort> servers,
java.lang.String targetGroupName)
Move a set of serves to another group
|
void |
moveTables(java.util.Set<TableName> tables,
java.lang.String targetGroup)
Move tables to a new group.
|
void |
prepareRSGroupForTable(HTableDescriptor desc) |
void |
removeRSGroup(java.lang.String name)
Remove a regionserver group
|
newClientpublic RSGroupAdminServer(MasterServices master, RSGroupInfoManager RSGroupInfoManager) throws java.io.IOException
java.io.IOExceptionpublic RSGroupInfo getRSGroupInfo(java.lang.String groupName) throws java.io.IOException
RSGroupAdmingetRSGroupInfo in class RSGroupAdmingroupName - the group namejava.io.IOExceptionpublic RSGroupInfo getRSGroupInfoOfTable(TableName tableName) throws java.io.IOException
RSGroupAdmingetRSGroupInfoOfTable in class RSGroupAdmintableName - the table namejava.io.IOExceptionpublic void moveServers(java.util.Set<HostAndPort> servers,
java.lang.String targetGroupName)
throws java.io.IOException
RSGroupAdminmoveServers in class RSGroupAdminservers - set of servers, must be in the form HOST:PORTtargetGroupName - the target groupjava.io.IOException - Signals that an I/O exception has occurred.public void moveTables(java.util.Set<TableName> tables, java.lang.String targetGroup) throws java.io.IOException
RSGroupAdminmoveTables in class RSGroupAdmintables - list of tables to movetargetGroup - target groupjava.io.IOException - on failure to move tablespublic void addRSGroup(java.lang.String name)
throws java.io.IOException
RSGroupAdminaddRSGroup in class RSGroupAdminname - name of the groupjava.io.IOException - on failure to add grouppublic void removeRSGroup(java.lang.String name)
throws java.io.IOException
RSGroupAdminremoveRSGroup in class RSGroupAdminname - name of the groupjava.io.IOException - on failure to remove grouppublic boolean balanceRSGroup(java.lang.String groupName)
throws java.io.IOException
RSGroupAdminbalanceRSGroup in class RSGroupAdmingroupName - the name of the group to balancejava.io.IOException - on unexpected failure to balance grouppublic java.util.List<RSGroupInfo> listRSGroups() throws java.io.IOException
RSGroupAdminlistRSGroups in class RSGroupAdminjava.io.IOExceptionpublic RSGroupInfo getRSGroupOfServer(HostAndPort hostPort) throws java.io.IOException
RSGroupAdmingetRSGroupOfServer in class RSGroupAdminhostPort - HostPort to get RSGroupInfo forjava.io.IOException - on unexpected failure to retrieve GroupInfo@InterfaceAudience.Private public RSGroupInfoManager getRSGroupInfoManager() throws java.io.IOException
java.io.IOExceptionpublic void prepareRSGroupForTable(HTableDescriptor desc) throws java.io.IOException
java.io.IOExceptionpublic void cleanupRSGroupForTable(TableName tableName) throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOException