@InterfaceAudience.Private public class RSGroupAdminServer extends Object implements RSGroupAdmin
Constructor and Description |
---|
RSGroupAdminServer(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.
|
void |
cleanupRSGroupForTable(TableName tableName) |
void |
close() |
RSGroupInfo |
getRSGroupInfo(String groupName)
Gets
RSGroupInfo for given group name. |
RSGroupInfoManager |
getRSGroupInfoManager() |
RSGroupInfo |
getRSGroupInfoOfTable(TableName tableName)
Gets
RSGroupInfo for the given table's group. |
RSGroupInfo |
getRSGroupOfServer(Address server)
Retrieve the RSGroupInfo a server is affiliated to
|
List<RSGroupInfo> |
listRSGroups()
Lists current set of RegionServer groups.
|
void |
moveServers(Set<Address> servers,
String targetGroupName)
Move given set of servers to the specified target RegionServer group.
|
void |
moveServersAndTables(Set<Address> servers,
Set<TableName> tables,
String targetGroup)
Move given set of servers and tables to the specified target RegionServer group.
|
void |
moveTables(Set<TableName> tables,
String targetGroup)
Move given set of tables to the specified target RegionServer group.
|
void |
prepareRSGroupForTable(HTableDescriptor desc) |
void |
removeRSGroup(String name)
Removes RegionServer group associated with the given name.
|
void |
removeServers(Set<Address> servers)
Remove decommissioned servers from rsgroup.
|
public RSGroupAdminServer(MasterServices master, RSGroupInfoManager RSGroupInfoManager) throws IOException
IOException
public RSGroupInfo getRSGroupInfo(String groupName) throws IOException
RSGroupAdmin
RSGroupInfo
for given group name.getRSGroupInfo
in interface RSGroupAdmin
IOException
public RSGroupInfo getRSGroupInfoOfTable(TableName tableName) throws IOException
RSGroupAdmin
RSGroupInfo
for the given table's group.getRSGroupInfoOfTable
in interface RSGroupAdmin
IOException
public void moveServers(Set<Address> servers, String targetGroupName) throws IOException
RSGroupAdmin
moveServers
in interface RSGroupAdmin
IOException
public void moveTables(Set<TableName> tables, String targetGroup) throws IOException
RSGroupAdmin
moveTables
in interface RSGroupAdmin
IOException
public void addRSGroup(String name) throws IOException
RSGroupAdmin
addRSGroup
in interface RSGroupAdmin
IOException
public void removeRSGroup(String name) throws IOException
RSGroupAdmin
removeRSGroup
in interface RSGroupAdmin
IOException
public boolean balanceRSGroup(String groupName) throws IOException
RSGroupAdmin
balanceRSGroup
in interface RSGroupAdmin
IOException
public List<RSGroupInfo> listRSGroups() throws IOException
RSGroupAdmin
listRSGroups
in interface RSGroupAdmin
IOException
public RSGroupInfo getRSGroupOfServer(Address server) throws IOException
RSGroupAdmin
getRSGroupOfServer
in interface RSGroupAdmin
server
- HostPort to get RSGroupInfo forIOException
@InterfaceAudience.Private public RSGroupInfoManager getRSGroupInfoManager() throws IOException
IOException
public void removeServers(Set<Address> servers) throws IOException
RSGroupAdmin
removeServers
in interface RSGroupAdmin
servers
- set of servers to removeIOException
public void prepareRSGroupForTable(HTableDescriptor desc) throws IOException
IOException
public void cleanupRSGroupForTable(TableName tableName) throws IOException
IOException
public void moveServersAndTables(Set<Address> servers, Set<TableName> tables, String targetGroup) throws IOException
RSGroupAdmin
moveServersAndTables
in interface RSGroupAdmin
servers
- set of servers to movetables
- set of tables to movetargetGroup
- the target group nameIOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.