public class RSGroupInfoManagerImpl extends Object implements RSGroupInfoManager, ServerListener
RSGroupInfoManager. Which makes
use of an HBase table as the persistence store for the group information.
It also makes use of zookeeper to store group information needed
for bootstrapping during offline mode.DEFAULT_REASSIGN_WAIT_INTERVAL, META_FAMILY_BYTES, META_QUALIFIER_BYTES, REASSIGN_WAIT_INTERVAL_KEY, ROW_KEY, RSGROUP_TABLE_NAME, rsGroupZNode| 构造器和说明 |
|---|
RSGroupInfoManagerImpl(MasterServices master) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addRSGroup(RSGroupInfo rsGroupInfo)
Adds the group.
|
RSGroupInfo |
getRSGroup(String groupName)
Gets the group information.
|
RSGroupInfo |
getRSGroupOfServer(Address server)
Gets the group info of server.
|
String |
getRSGroupOfTable(TableName tableName)
Gets the group name for a given table
|
void |
init() |
boolean |
isOnline()
Whether the manager is able to fully return group metadata
|
List<RSGroupInfo> |
listRSGroups()
List the existing
RSGroupInfos. |
Set<Address> |
moveServers(Set<Address> servers,
String srcGroup,
String dstGroup)
Move servers to a new group.
|
void |
moveServersAndTables(Set<Address> servers,
Set<TableName> tables,
String srcGroup,
String dstGroup)
Move servers and tables to a new group.
|
void |
moveTables(Set<TableName> tableNames,
String groupName)
Set the group membership of a set of tables
|
void |
refresh()
Refresh/reload the group information from the persistent store
|
void |
removeRSGroup(String groupName)
Delete a region server group.
|
void |
removeServers(Set<Address> servers)
Remove decommissioned servers from rsgroup
|
void |
serverAdded(ServerName serverName) |
void |
serverRemoved(ServerName serverName) |
void |
start() |
void |
waiting() |
public RSGroupInfoManagerImpl(MasterServices master) throws IOException
IOExceptionpublic void init()
throws IOException
IOExceptionpublic void start()
start 在接口中 RSGroupInfoManagerpublic void addRSGroup(RSGroupInfo rsGroupInfo) throws IOException
addRSGroup 在接口中 RSGroupInfoManagerrsGroupInfo - the group nameIOExceptionpublic Set<Address> moveServers(Set<Address> servers, String srcGroup, String dstGroup) throws IOException
RSGroupInfoManagermoveServers 在接口中 RSGroupInfoManagerservers - list of servers, must be part of the same groupsrcGroup - groupName being moved fromdstGroup - groupName being moved toservers).IOExceptionpublic RSGroupInfo getRSGroupOfServer(Address server) throws IOException
getRSGroupOfServer 在接口中 RSGroupInfoManagerserver - the serverIOExceptionpublic RSGroupInfo getRSGroup(String groupName) throws IOException
getRSGroup 在接口中 RSGroupInfoManagergroupName - the group nameIOExceptionpublic String getRSGroupOfTable(TableName tableName) throws IOException
getRSGroupOfTable 在接口中 RSGroupInfoManagertableName - the table nameIOExceptionpublic void moveTables(Set<TableName> tableNames, String groupName) throws IOException
RSGroupInfoManagermoveTables 在接口中 RSGroupInfoManagertableNames - set of tables to movegroupName - name of group of tables to move toIOExceptionpublic void removeRSGroup(String groupName) throws IOException
removeRSGroup 在接口中 RSGroupInfoManagergroupName - the group nameIOException - Signals that an I/O exception has occurred.public List<RSGroupInfo> listRSGroups() throws IOException
RSGroupInfoManagerRSGroupInfos.listRSGroups 在接口中 RSGroupInfoManagerIOExceptionpublic boolean isOnline()
RSGroupInfoManagerisOnline 在接口中 RSGroupInfoManagerpublic void refresh()
throws IOException
RSGroupInfoManagerrefresh 在接口中 RSGroupInfoManagerIOExceptionpublic void serverAdded(ServerName serverName)
serverAdded 在接口中 ServerListenerpublic void serverRemoved(ServerName serverName)
serverRemoved 在接口中 ServerListenerpublic void waiting()
waiting 在接口中 ServerListenerpublic void moveServersAndTables(Set<Address> servers, Set<TableName> tables, String srcGroup, String dstGroup) throws IOException
RSGroupInfoManagermoveServersAndTables 在接口中 RSGroupInfoManagerservers - list of servers, must be part of the same grouptables - set of tables to movesrcGroup - groupName being moved fromdstGroup - groupName being moved toIOExceptionpublic void removeServers(Set<Address> servers) throws IOException
RSGroupInfoManagerremoveServers 在接口中 RSGroupInfoManagerservers - set of servers to removeIOExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.