Package org.apache.hadoop.hbase.rsgroup
Interface RSGroupInfoManager
- All Known Implementing Classes:
RSGroupInfoManagerImpl
Interface used to manage RSGroupInfo storage. An implementation has the option to support offline
mode. See
RSGroupBasedLoadBalancer
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRSGroup
(RSGroupInfo rsGroupInfo) Add given RSGroupInfo to existing list of group infos.determineRSGroupInfoForTable
(TableName tableName) DetermineRSGroupInfo
for the given table.getRSGroup
(String groupName) GetsRSGroupInfo
for the given group name.getRSGroupOfServer
(Address serverHostPort) Gets the group info of server.getRSGroupOfTable
(TableName tableName) Get the group membership of a tableboolean
isOnline()
Whether the manager is able to fully return group metadataList the existingRSGroupInfo
s.moveServers
(Set<Address> servers, String srcGroup, String dstGroup) Move servers to a new group.void
Move servers and tables to a new group.void
moveTables
(Set<TableName> tableNames, String groupName) Set the group membership of a set of tablesvoid
refresh()
Refresh/reload the group information from the persistent storevoid
removeRSGroup
(String groupName) Remove a region server group.void
removeServers
(Set<Address> servers) Remove decommissioned servers from rsgroupvoid
renameRSGroup
(String oldName, String newName) Rename RSGroupvoid
start()
void
updateRSGroupConfig
(String groupName, Map<String, String> configuration) Update RSGroup configuration
-
Field Details
-
REASSIGN_WAIT_INTERVAL_KEY
- See Also:
-
DEFAULT_REASSIGN_WAIT_INTERVAL
- See Also:
-
RSGROUP_TABLE_NAME
-
rsGroupZNode
- See Also:
-
META_FAMILY_BYTES
-
META_QUALIFIER_BYTES
-
ROW_KEY
-
-
Method Details
-
start
void start() -
addRSGroup
Add given RSGroupInfo to existing list of group infos.- Throws:
IOException
-
removeRSGroup
Remove a region server group.- Throws:
IOException
-
moveServers
Move servers to a new group.- Parameters:
servers
- list of servers, must be part of the same groupsrcGroup
- groupName being moved fromdstGroup
- groupName being moved to- Returns:
- Set of servers moved (May be a subset of
servers
). - Throws:
IOException
-
getRSGroupOfServer
Gets the group info of server.- Throws:
IOException
-
getRSGroup
GetsRSGroupInfo
for the given group name.- Throws:
IOException
-
getRSGroupOfTable
Get the group membership of a table- Throws:
IOException
-
moveTables
Set the group membership of a set of tables- Parameters:
tableNames
- set of tables to movegroupName
- name of group of tables to move to- Throws:
IOException
-
listRSGroups
List the existingRSGroupInfo
s.- Throws:
IOException
-
refresh
Refresh/reload the group information from the persistent store- Throws:
IOException
-
isOnline
boolean isOnline()Whether the manager is able to fully return group metadata- Returns:
- whether the manager is in online mode
-
moveServersAndTables
void moveServersAndTables(Set<Address> servers, Set<TableName> tables, String srcGroup, String dstGroup) throws IOException Move servers and tables to a new group.- Parameters:
servers
- list of servers, must be part of the same grouptables
- set of tables to movesrcGroup
- groupName being moved fromdstGroup
- groupName being moved to- Throws:
IOException
-
removeServers
Remove decommissioned servers from rsgroup- Parameters:
servers
- set of servers to remove- Throws:
IOException
-
renameRSGroup
Rename RSGroup- Parameters:
oldName
- old rsgroup namenewName
- new rsgroup name- Throws:
IOException
-
determineRSGroupInfoForTable
DetermineRSGroupInfo
for the given table.- Parameters:
tableName
- table name- Returns:
RSGroupInfo
which table should belong to- Throws:
IOException
-
updateRSGroupConfig
Update RSGroup configuration- Parameters:
groupName
- the group nameconfiguration
- new configuration of the group name to be set- Throws:
IOException
- if a remote or network exception occurs
-