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
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRSGroup(RSGroupInfo rsGroupInfo) Add given RSGroupInfo to existing list of group infos.determineRSGroupInfoForTable(TableName tableName) DetermineRSGroupInfofor the given table.getRSGroup(String groupName) GetsRSGroupInfofor the given group name.getRSGroupOfServer(Address serverHostPort) Gets the group info of server.getRSGroupOfTable(TableName tableName) Get the group membership of a tablebooleanisOnline()Whether the manager is able to fully return group metadataList the existingRSGroupInfos.moveServers(Set<Address> servers, String srcGroup, String dstGroup) Move servers to a new group.voidMove servers and tables to a new group.voidmoveTables(Set<TableName> tableNames, String groupName) Set the group membership of a set of tablesvoidrefresh()Refresh/reload the group information from the persistent storevoidremoveRSGroup(String groupName) Remove a region server group.voidremoveServers(Set<Address> servers) Remove decommissioned servers from rsgroupvoidrenameRSGroup(String oldName, String newName) Rename RSGroupvoidstart()voidupdateRSGroupConfig(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
GetsRSGroupInfofor 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 existingRSGroupInfos.- 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
DetermineRSGroupInfofor the given table.- Parameters:
tableName- table name- Returns:
RSGroupInfowhich 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
-