@InterfaceAudience.LimitedPrivate(value="Configuration") public class RpcConnectionRegistry extends AbstractRpcBasedConnectionRegistry
RegistryProtos.ClientMetaService to get registry
information.
It needs bootstrap node list when start up, and then it will use RegistryProtos.ClientMetaService to
refresh the bootstrap node list periodically.
Usually, you could set masters as the bootstrap nodes,as they will also implement the
RegistryProtos.ClientMetaService, and then, we will switch to use region servers after refreshing the
bootstrap nodes.AbstractRpcBasedConnectionRegistry.Callable<T>| Modifier and Type | Field and Description |
|---|---|
private static char |
ADDRS_CONF_SEPARATOR |
static String |
BOOTSTRAP_NODES |
private String |
connectionString |
static String |
HEDGED_REQS_FANOUT_KEY
Configuration key that controls the fan out of requests
|
static String |
INITIAL_REFRESH_DELAY_SECS
As end users could configure any nodes in a cluster as the initial bootstrap nodes, it is
possible that different end users will configure the same machine which makes the machine over
load.
|
static String |
MIN_SECS_BETWEEN_REFRESHES |
static String |
PERIODIC_REFRESH_INTERVAL_SECS |
HEDGED_REQS_FANOUT_DEFAULT| Constructor and Description |
|---|
RpcConnectionRegistry(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
private String |
buildConnectionString(org.apache.hadoop.conf.Configuration conf) |
protected CompletableFuture<Set<ServerName>> |
fetchEndpoints() |
private CompletableFuture<Set<ServerName>> |
getBootstrapNodes() |
protected Set<ServerName> |
getBootstrapNodes(org.apache.hadoop.conf.Configuration conf) |
String |
getConnectionString()
Return the connection string associated with this registry instance.
|
private static Set<ServerName> |
transformServerNames(org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetBootstrapNodesResponse resp) |
call, close, getActiveMaster, getClusterId, getMetaRegionLocations, getParsedServerspublic static final String HEDGED_REQS_FANOUT_KEY
public static final String INITIAL_REFRESH_DELAY_SECS
public static final String PERIODIC_REFRESH_INTERVAL_SECS
public static final String MIN_SECS_BETWEEN_REFRESHES
public static final String BOOTSTRAP_NODES
private static final char ADDRS_CONF_SEPARATOR
private final String connectionString
RpcConnectionRegistry(org.apache.hadoop.conf.Configuration conf) throws IOException
IOExceptionprivate String buildConnectionString(org.apache.hadoop.conf.Configuration conf) throws UnknownHostException
UnknownHostExceptionprotected Set<ServerName> getBootstrapNodes(org.apache.hadoop.conf.Configuration conf) throws IOException
getBootstrapNodes in class AbstractRpcBasedConnectionRegistryIOExceptionpublic String getConnectionString()
ConnectionRegistryprivate static Set<ServerName> transformServerNames(org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.GetBootstrapNodesResponse resp)
private CompletableFuture<Set<ServerName>> getBootstrapNodes()
protected CompletableFuture<Set<ServerName>> fetchEndpoints()
fetchEndpoints in class AbstractRpcBasedConnectionRegistryCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.