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| Constructor and Description |
|---|
RSGroupInfoManagerImpl(MasterServices master) |
| Modifier and Type | Method and Description |
|---|---|
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)
The server has joined the cluster.
|
void |
serverRemoved(ServerName serverName)
The server was removed from the cluster.
|
void |
start() |
void |
waiting()
Started waiting on RegionServers to check-in.
|
public RSGroupInfoManagerImpl(MasterServices master) throws IOException
IOExceptionpublic void init()
throws IOException
IOExceptionpublic void start()
start in interface RSGroupInfoManagerpublic void addRSGroup(RSGroupInfo rsGroupInfo) throws IOException
addRSGroup in interface RSGroupInfoManagerrsGroupInfo - the group nameIOExceptionpublic Set<Address> moveServers(Set<Address> servers, String srcGroup, String dstGroup) throws IOException
RSGroupInfoManagermoveServers in interface 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 in interface RSGroupInfoManagerserver - the serverIOExceptionpublic RSGroupInfo getRSGroup(String groupName) throws IOException
getRSGroup in interface RSGroupInfoManagergroupName - the group nameIOExceptionpublic String getRSGroupOfTable(TableName tableName) throws IOException
getRSGroupOfTable in interface RSGroupInfoManagertableName - the table nameIOExceptionpublic void moveTables(Set<TableName> tableNames, String groupName) throws IOException
RSGroupInfoManagermoveTables in interface RSGroupInfoManagertableNames - set of tables to movegroupName - name of group of tables to move toIOExceptionpublic void removeRSGroup(String groupName) throws IOException
removeRSGroup in interface RSGroupInfoManagergroupName - the group nameIOException - Signals that an I/O exception has occurred.public List<RSGroupInfo> listRSGroups() throws IOException
RSGroupInfoManagerRSGroupInfos.listRSGroups in interface RSGroupInfoManagerIOExceptionpublic boolean isOnline()
RSGroupInfoManagerisOnline in interface RSGroupInfoManagerpublic void refresh()
throws IOException
RSGroupInfoManagerrefresh in interface RSGroupInfoManagerIOExceptionpublic void serverAdded(ServerName serverName)
ServerListenerserverAdded in interface ServerListenerserverName - The remote servers name.public void serverRemoved(ServerName serverName)
ServerListenerserverRemoved in interface ServerListenerserverName - The remote servers name.public void waiting()
ServerListenerwaiting in interface ServerListenerpublic void moveServersAndTables(Set<Address> servers, Set<TableName> tables, String srcGroup, String dstGroup) throws IOException
RSGroupInfoManagermoveServersAndTables in interface 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 in interface RSGroupInfoManagerservers - set of servers to removeIOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.