@InterfaceAudience.Private public class RSGroupAdminServer extends Object implements RSGroupAdmin
| Modifier and Type | Field and Description |
|---|---|
static String |
KEEP_ONE_SERVER_IN_DEFAULT_ERROR_MESSAGE |
| Constructor and Description |
|---|
RSGroupAdminServer(org.apache.hadoop.hbase.master.MasterServices master,
RSGroupInfoManager rsGroupInfoManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRSGroup(String name)
Creates a new RegionServer group with the given name.
|
boolean |
balanceRSGroup(String groupName)
Balance regions in the given RegionServer group.
|
org.apache.hadoop.hbase.rsgroup.RSGroupInfo |
getRSGroupInfo(String groupName)
Gets
RSGroupInfo for given group name. |
org.apache.hadoop.hbase.rsgroup.RSGroupInfo |
getRSGroupInfoOfTable(org.apache.hadoop.hbase.TableName tableName)
Gets
RSGroupInfo for the given table's group. |
org.apache.hadoop.hbase.rsgroup.RSGroupInfo |
getRSGroupOfServer(org.apache.hadoop.hbase.net.Address hostPort)
Retrieve the RSGroupInfo a server is affiliated to
|
List<org.apache.hadoop.hbase.rsgroup.RSGroupInfo> |
listRSGroups()
Lists current set of RegionServer groups.
|
void |
moveServers(Set<org.apache.hadoop.hbase.net.Address> servers,
String targetGroupName)
Move given set of servers to the specified target RegionServer group.
|
void |
moveServersAndTables(Set<org.apache.hadoop.hbase.net.Address> servers,
Set<org.apache.hadoop.hbase.TableName> tables,
String targetGroup)
Move given set of servers and tables to the specified target RegionServer group.
|
void |
moveTables(Set<org.apache.hadoop.hbase.TableName> tables,
String targetGroup)
Move given set of tables to the specified target RegionServer group.
|
void |
removeRSGroup(String name)
Removes RegionServer group associated with the given name.
|
void |
removeServers(Set<org.apache.hadoop.hbase.net.Address> servers)
Remove decommissioned servers from rsgroup.
|
public static final String KEEP_ONE_SERVER_IN_DEFAULT_ERROR_MESSAGE
public RSGroupAdminServer(org.apache.hadoop.hbase.master.MasterServices master,
RSGroupInfoManager rsGroupInfoManager)
public org.apache.hadoop.hbase.rsgroup.RSGroupInfo getRSGroupInfo(String groupName) throws IOException
RSGroupAdminRSGroupInfo for given group name.getRSGroupInfo in interface RSGroupAdminIOExceptionpublic org.apache.hadoop.hbase.rsgroup.RSGroupInfo getRSGroupInfoOfTable(org.apache.hadoop.hbase.TableName tableName)
throws IOException
RSGroupAdminRSGroupInfo for the given table's group.getRSGroupInfoOfTable in interface RSGroupAdminIOExceptionpublic void moveServers(Set<org.apache.hadoop.hbase.net.Address> servers, String targetGroupName) throws IOException
RSGroupAdminmoveServers in interface RSGroupAdminIOExceptionpublic void moveTables(Set<org.apache.hadoop.hbase.TableName> tables, String targetGroup) throws IOException
RSGroupAdminmoveTables in interface RSGroupAdminIOExceptionpublic void addRSGroup(String name) throws IOException
RSGroupAdminaddRSGroup in interface RSGroupAdminIOExceptionpublic void removeRSGroup(String name) throws IOException
RSGroupAdminremoveRSGroup in interface RSGroupAdminIOExceptionpublic boolean balanceRSGroup(String groupName) throws IOException
RSGroupAdminbalanceRSGroup in interface RSGroupAdminIOExceptionpublic List<org.apache.hadoop.hbase.rsgroup.RSGroupInfo> listRSGroups() throws IOException
RSGroupAdminlistRSGroups in interface RSGroupAdminIOExceptionpublic org.apache.hadoop.hbase.rsgroup.RSGroupInfo getRSGroupOfServer(org.apache.hadoop.hbase.net.Address hostPort)
throws IOException
RSGroupAdmingetRSGroupOfServer in interface RSGroupAdminhostPort - HostPort to get RSGroupInfo forIOExceptionpublic void moveServersAndTables(Set<org.apache.hadoop.hbase.net.Address> servers, Set<org.apache.hadoop.hbase.TableName> tables, String targetGroup) throws IOException
RSGroupAdminmoveServersAndTables in interface RSGroupAdminservers - set of servers to movetables - set of tables to movetargetGroup - the target group nameIOException - if moving the server and tables failpublic void removeServers(Set<org.apache.hadoop.hbase.net.Address> servers) throws IOException
RSGroupAdminremoveServers in interface RSGroupAdminservers - set of servers to removeIOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.