public class RSGroupAdminServer extends java.lang.Object implements RSGroupAdmin
| Constructor and Description |
|---|
RSGroupAdminServer(MasterServices master,
RSGroupInfoManager rsGroupInfoManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRSGroup(java.lang.String name)
Creates a new RegionServer group with the given name.
|
boolean |
balanceRSGroup(java.lang.String groupName)
Balance regions in the given RegionServer group.
|
RSGroupInfo |
getRSGroupInfo(java.lang.String groupName)
Gets
RSGroupInfo for given group name. |
RSGroupInfo |
getRSGroupInfoOfTable(TableName tableName)
Gets
RSGroupInfo for the given table's group. |
RSGroupInfo |
getRSGroupOfServer(Address hostPort)
Retrieve the RSGroupInfo a server is affiliated to
|
java.util.List<RSGroupInfo> |
listRSGroups()
Lists current set of RegionServer groups.
|
void |
moveServers(java.util.Set<Address> servers,
java.lang.String targetGroupName)
Move given set of servers to the specified target RegionServer group.
|
void |
moveServersAndTables(java.util.Set<Address> servers,
java.util.Set<TableName> tables,
java.lang.String targetGroup)
Move given set of servers and tables to the specified target RegionServer group.
|
void |
moveTables(java.util.Set<TableName> tables,
java.lang.String targetGroup)
Move given set of tables to the specified target RegionServer group.
|
void |
removeRSGroup(java.lang.String name)
Removes RegionServer group associated with the given name.
|
void |
removeServers(java.util.Set<Address> servers)
Remove decommissioned servers from rsgroup.
|
public RSGroupAdminServer(MasterServices master, RSGroupInfoManager rsGroupInfoManager) throws java.io.IOException
java.io.IOExceptionpublic RSGroupInfo getRSGroupInfo(java.lang.String groupName)
throws java.io.IOException
RSGroupAdminRSGroupInfo for given group name.getRSGroupInfo in interface RSGroupAdminjava.io.IOExceptionpublic RSGroupInfo getRSGroupInfoOfTable(TableName tableName)
throws java.io.IOException
RSGroupAdminRSGroupInfo for the given table's group.getRSGroupInfoOfTable in interface RSGroupAdminjava.io.IOExceptionpublic void moveServers(java.util.Set<Address> servers,
java.lang.String targetGroupName)
throws java.io.IOException
RSGroupAdminmoveServers in interface RSGroupAdminjava.io.IOExceptionpublic void moveTables(java.util.Set<TableName> tables,
java.lang.String targetGroup)
throws java.io.IOException
RSGroupAdminmoveTables in interface RSGroupAdminjava.io.IOExceptionpublic void addRSGroup(java.lang.String name)
throws java.io.IOException
RSGroupAdminaddRSGroup in interface RSGroupAdminjava.io.IOExceptionpublic void removeRSGroup(java.lang.String name)
throws java.io.IOException
RSGroupAdminremoveRSGroup in interface RSGroupAdminjava.io.IOExceptionpublic boolean balanceRSGroup(java.lang.String groupName)
throws java.io.IOException
RSGroupAdminbalanceRSGroup in interface RSGroupAdminjava.io.IOExceptionpublic java.util.List<RSGroupInfo> listRSGroups()
throws java.io.IOException
RSGroupAdminlistRSGroups in interface RSGroupAdminjava.io.IOExceptionpublic RSGroupInfo getRSGroupOfServer(Address hostPort)
throws java.io.IOException
RSGroupAdmingetRSGroupOfServer in interface RSGroupAdminhostPort - HostPort to get RSGroupInfo forjava.io.IOExceptionpublic void moveServersAndTables(java.util.Set<Address> servers,
java.util.Set<TableName> tables,
java.lang.String targetGroup)
throws java.io.IOException
RSGroupAdminmoveServersAndTables in interface RSGroupAdminservers - set of servers to movetables - set of tables to movetargetGroup - the target group namejava.io.IOException - if moving the server and tables failpublic void removeServers(java.util.Set<Address> servers)
throws java.io.IOException
RSGroupAdminremoveServers in interface RSGroupAdminservers - set of servers to removejava.io.IOException