Package org.apache.hadoop.hbase.client
Class ConnectionRegistryRpcStubHolder
java.lang.Object
org.apache.hadoop.hbase.client.ConnectionRegistryRpcStubHolder
- All Implemented Interfaces:
Closeable
,AutoCloseable
A class for creating
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.
-
Field Summary
Modifier and TypeFieldDescriptionprivate org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,
org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface> private CompletableFuture<org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,
org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface>> private final Set<ServerName>
private final org.apache.hadoop.conf.Configuration
private static final org.slf4j.Logger
private final org.apache.hadoop.conf.Configuration
private RpcClient
private final RpcControllerFactory
private final int
private final User
-
Constructor Summary
ConstructorDescriptionConnectionRegistryRpcStubHolder
(org.apache.hadoop.conf.Configuration conf, User user, RpcControllerFactory rpcControllerFactory, Set<ServerName> bootstrapNodes) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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>> (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)
-
Field Details
-
LOG
-
conf
-
noAuthConf
-
user
-
rpcControllerFactory
-
bootstrapNodes
-
rpcTimeoutMs
-
addr2Stub
private volatile org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface> addr2Stub -
rpcClient
-
addr2StubFuture
private CompletableFuture<org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface>> addr2StubFuture
-
-
Constructor Details
-
ConnectionRegistryRpcStubHolder
ConnectionRegistryRpcStubHolder(org.apache.hadoop.conf.Configuration conf, User user, RpcControllerFactory rpcControllerFactory, Set<ServerName> bootstrapNodes)
-
-
Method Details
-
createStubs
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) -
fetchClusterIdAndCreateStubs
private CompletableFuture<org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface>> fetchClusterIdAndCreateStubs() -
getStubs
CompletableFuture<org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap<ServerName,org.apache.hadoop.hbase.shaded.protobuf.generated.RegistryProtos.ClientMetaService.Interface>> getStubs() -
refreshStubs
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-