@InterfaceAudience.Private public class RSGroupAdminServer extends RSGroupAdmin
| Constructor and Description |
|---|
RSGroupAdminServer(MasterServices master,
RSGroupInfoManager RSGroupInfoManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRSGroup(String name)
Add a new group
|
boolean |
balanceRSGroup(String groupName)
Balance the regions in a group
|
void |
cleanupRSGroupForTable(TableName tableName) |
void |
close() |
RSGroupInfo |
getRSGroupInfo(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
|
List<RSGroupInfo> |
listRSGroups()
Lists the existing groups.
|
void |
moveServers(Set<HostAndPort> servers,
String targetGroupName)
Move a set of serves to another group
|
void |
moveTables(Set<TableName> tables,
String targetGroup)
Move tables to a new group.
|
void |
prepareRSGroupForTable(HTableDescriptor desc) |
void |
removeRSGroup(String name)
Remove a regionserver group
|
newClientpublic RSGroupAdminServer(MasterServices master, RSGroupInfoManager RSGroupInfoManager) throws IOException
IOExceptionpublic 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 targetGroupName) throws IOException
RSGroupAdminmoveServers in class RSGroupAdminservers - set of servers, must be in the form HOST:PORTtargetGroupName - 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 addRSGroup(String name) throws IOException
RSGroupAdminaddRSGroup in class RSGroupAdminname - name of the groupIOException - on failure to add grouppublic void removeRSGroup(String name) throws IOException
RSGroupAdminremoveRSGroup in class RSGroupAdminname - name of the groupIOException - on failure to remove grouppublic boolean balanceRSGroup(String groupName) throws IOException
RSGroupAdminbalanceRSGroup in class RSGroupAdmingroupName - 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 GroupInfo@InterfaceAudience.Private public RSGroupInfoManager getRSGroupInfoManager() throws IOException
IOExceptionpublic void prepareRSGroupForTable(HTableDescriptor desc) throws IOException
IOExceptionpublic void cleanupRSGroupForTable(TableName tableName) throws IOException
IOExceptionpublic void close()
throws IOException
IOException