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 java.lang.String |
rsGroupZNode |
| Modifier and Type | Method and Description |
|---|---|
void |
addRSGroup(RSGroupInfo rsGroupInfo)
Adds the group.
|
RSGroupInfo |
getRSGroup(java.lang.String groupName)
Gets the group information.
|
RSGroupInfo |
getRSGroupOfServer(HostAndPort hostPort)
Gets the group info of server.
|
java.lang.String |
getRSGroupOfTable(TableName tableName)
Get the group membership of a table
|
boolean |
isOnline()
Whether the manager is able to fully
return group metadata
|
java.util.List<RSGroupInfo> |
listRSGroups()
List the groups
|
boolean |
moveServers(java.util.Set<HostAndPort> hostPorts,
java.lang.String srcGroup,
java.lang.String dstGroup)
move servers to a new group.
|
void |
moveTables(java.util.Set<TableName> tableNames,
java.lang.String groupName)
Set the group membership of a set of tables
|
void |
refresh()
Refresh/reload the group information from
the persistent store
|
void |
removeRSGroup(java.lang.String groupName)
Remove a region server group.
|
static final TableName RSGROUP_TABLE_NAME
static final byte[] RSGROUP_TABLE_NAME_BYTES
static final java.lang.String rsGroupZNode
static final byte[] META_FAMILY_BYTES
static final byte[] META_QUALIFIER_BYTES
static final byte[] ROW_KEY
void addRSGroup(RSGroupInfo rsGroupInfo) throws java.io.IOException
rsGroupInfo - the group namejava.io.IOException - Signals that an I/O exception has occurred.void removeRSGroup(java.lang.String groupName)
throws java.io.IOException
groupName - the group namejava.io.IOException - Signals that an I/O exception has occurred.boolean moveServers(java.util.Set<HostAndPort> hostPorts,
java.lang.String srcGroup,
java.lang.String dstGroup)
throws java.io.IOException
hostPorts - list of servers, must be part of the same groupsrcGroup - groupName being moved fromdstGroup - groupName being moved tojava.io.IOException - on move failureRSGroupInfo getRSGroupOfServer(HostAndPort hostPort) throws java.io.IOException
hostPort - the serverjava.io.IOExceptionRSGroupInfo getRSGroup(java.lang.String groupName) throws java.io.IOException
groupName - the group namejava.io.IOExceptionjava.lang.String getRSGroupOfTable(TableName tableName) throws java.io.IOException
tableName - name of table to get group membershipjava.io.IOException - on failure to retrive informationvoid moveTables(java.util.Set<TableName> tableNames, java.lang.String groupName) throws java.io.IOException
tableNames - set of tables to movegroupName - name of group of tables to move tojava.io.IOException - on failure to movejava.util.List<RSGroupInfo> listRSGroups() throws java.io.IOException
java.io.IOException - on failurevoid refresh()
throws java.io.IOException
java.io.IOException - on failure to refreshboolean isOnline()