@InterfaceAudience.Public public class RSGroupInfo extends Object
Modifier and Type | Field and Description |
---|---|
private Map<String,String> |
configuration |
static String |
DEFAULT_GROUP |
private String |
name |
static String |
NAMESPACE_DESC_PROP_GROUP |
private SortedSet<Address> |
servers |
static String |
TABLE_DESC_PROP_GROUP |
private SortedSet<TableName> |
tables |
Constructor and Description |
---|
RSGroupInfo(RSGroupInfo src) |
RSGroupInfo(String name) |
RSGroupInfo(String name,
Set<Address> servers) |
RSGroupInfo(String name,
Set<Address> servers,
Set<TableName> tables)
Deprecated.
Since 3.0.0, will be removed in 4.0.0. The rsgroup information for a table will be
stored in the configuration of a table so this will be removed.
|
Modifier and Type | Method and Description |
---|---|
void |
addAllServers(Collection<Address> hostPort)
Adds the given servers to the group.
|
void |
addAllTables(Collection<TableName> arg) |
void |
addServer(Address hostPort)
Adds the given server to the group.
|
void |
addTable(TableName table) |
boolean |
containsServer(Address hostPort)
Returns true if a server with hostPort is found
|
boolean |
containsTable(TableName table) |
boolean |
equals(Object o) |
Map<String,String> |
getConfiguration()
Getter for fetching an unmodifiable
configuration map. |
String |
getName()
Get group name.
|
Set<Address> |
getServers()
Get list of servers.
|
SortedSet<TableName> |
getTables()
Get set of tables that are members of the group.
|
int |
hashCode() |
void |
removeConfiguration(String key)
Remove a config setting represented by the key from the
configuration map |
boolean |
removeServer(Address hostPort)
Remove given server from the group.
|
boolean |
removeTable(TableName table) |
void |
setConfiguration(String key,
String value)
Setter for storing a configuration setting in
configuration map. |
String |
toString() |
public static final String DEFAULT_GROUP
public static final String NAMESPACE_DESC_PROP_GROUP
public static final String TABLE_DESC_PROP_GROUP
private final Map<String,String> configuration
public RSGroupInfo(String name)
RSGroupInfo(String name, Set<Address> servers)
@Deprecated RSGroupInfo(String name, Set<Address> servers, Set<TableName> tables)
public RSGroupInfo(RSGroupInfo src)
public void addAllServers(Collection<Address> hostPort)
public boolean containsServer(Address hostPort)
public Set<Address> getServers()
public boolean removeServer(Address hostPort)
public void addAllTables(Collection<TableName> arg)
public boolean containsTable(TableName table)
public boolean removeTable(TableName table)
public Map<String,String> getConfiguration()
configuration
map.public void setConfiguration(String key, String value)
configuration
map.key
- Config key.value
- String value.public void removeConfiguration(String key)
configuration
mapCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.