@InterfaceAudience.Private class ConnectionRegistryRpcStubHolder extends Object implements Closeable
RpcClient
and related stubs used by
AbstractRpcBasedConnectionRegistry
. We need to connect to bootstrap nodes to get the
cluster id first, before creating the final RpcClient
and related stubs.
See HBASE-25051 for more details.
Modifier and Type | Field and Description |
---|---|
private org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface> |
addr2Stub |
private CompletableFuture<org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface>> |
addr2StubFuture |
private Set<ServerName> |
bootstrapNodes |
private org.apache.hadoop.conf.Configuration |
conf |
private static org.slf4j.Logger |
LOG |
private org.apache.hadoop.conf.Configuration |
noAuthConf |
private RpcClient |
rpcClient |
private RpcControllerFactory |
rpcControllerFactory |
private int |
rpcTimeoutMs |
private User |
user |
Constructor and Description |
---|
ConnectionRegistryRpcStubHolder(org.apache.hadoop.conf.Configuration conf,
User user,
RpcControllerFactory rpcControllerFactory,
Set<ServerName> bootstrapNodes) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
private org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface> |
createStubs(RpcClient rpcClient,
Collection<ServerName> addrs) |
private CompletableFuture<org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface>> |
fetchClusterIdAndCreateStubs() |
(package private) CompletableFuture<org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface>> |
getStubs() |
(package private) void |
refreshStubs(IOExceptionSupplier<Collection<ServerName>> fetchEndpoints) |
private static final org.slf4j.Logger LOG
private final org.apache.hadoop.conf.Configuration conf
private final org.apache.hadoop.conf.Configuration noAuthConf
private final RpcControllerFactory rpcControllerFactory
private final Set<ServerName> bootstrapNodes
private final int rpcTimeoutMs
private volatile org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface> addr2Stub
private CompletableFuture<org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface>> addr2StubFuture
ConnectionRegistryRpcStubHolder(org.apache.hadoop.conf.Configuration conf, User user, RpcControllerFactory rpcControllerFactory, Set<ServerName> bootstrapNodes)
private org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface> createStubs(RpcClient rpcClient, Collection<ServerName> addrs)
private CompletableFuture<org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface>> fetchClusterIdAndCreateStubs()
CompletableFuture<org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface>> getStubs()
void refreshStubs(IOExceptionSupplier<Collection<ServerName>> fetchEndpoints) throws IOException
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.