public interface RSGroupInfoManager
RSGroupBasedLoadBalancer| Modifier and Type | Field and Description |
|---|---|
static byte[] |
META_FAMILY_BYTES |
static byte[] |
META_QUALIFIER_BYTES |
static byte[] |
ROW_KEY |
static TableName |
RSGROUP_TABLE_NAME |
static byte[] |
RSGROUP_TABLE_NAME_BYTES |
static String |
rsGroupZNode |
| Modifier and Type | Method and Description |
|---|---|
void |
addRSGroup(RSGroupInfo rsGroupInfo)
Adds the group.
|
RSGroupInfo |
getRSGroup(String groupName)
Gets the group information.
|
RSGroupInfo |
getRSGroupOfServer(HostAndPort hostPort)
Gets the group info of server.
|
String |
getRSGroupOfTable(TableName tableName)
Get the group membership of a table
|
boolean |
isOnline()
Whether the manager is able to fully
return group metadata
|
List<RSGroupInfo> |
listRSGroups()
List the groups
|
boolean |
moveServers(Set<HostAndPort> hostPorts,
String srcGroup,
String dstGroup)
move servers 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)
Remove a region server group.
|
static final TableName RSGROUP_TABLE_NAME
static final byte[] RSGROUP_TABLE_NAME_BYTES
static final String rsGroupZNode
static final byte[] META_FAMILY_BYTES
static final byte[] META_QUALIFIER_BYTES
static final byte[] ROW_KEY
void addRSGroup(RSGroupInfo rsGroupInfo) throws IOException
rsGroupInfo - the group nameIOException - Signals that an I/O exception has occurred.void removeRSGroup(String groupName) throws IOException
groupName - the group nameIOException - Signals that an I/O exception has occurred.boolean moveServers(Set<HostAndPort> hostPorts, String srcGroup, String dstGroup) throws IOException
hostPorts - list of servers, must be part of the same groupsrcGroup - groupName being moved fromdstGroup - groupName being moved toIOException - on move failureRSGroupInfo getRSGroupOfServer(HostAndPort hostPort) throws IOException
hostPort - the serverIOExceptionRSGroupInfo getRSGroup(String groupName) throws IOException
groupName - the group nameIOExceptionString getRSGroupOfTable(TableName tableName) throws IOException
tableName - name of table to get group membershipIOException - on failure to retrive informationvoid moveTables(Set<TableName> tableNames, String groupName) throws IOException
tableNames - set of tables to movegroupName - name of group of tables to move toIOException - on failure to moveList<RSGroupInfo> listRSGroups() throws IOException
IOException - on failurevoid refresh()
throws IOException
IOException - on failure to refreshboolean isOnline()