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
FieldsModifier 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.Configurationprivate static final org.slf4j.Loggerprivate final org.apache.hadoop.conf.Configurationprivate RpcClientprivate final RpcControllerFactoryprivate final intprivate final User -
Constructor Summary
ConstructorsConstructorDescriptionConnectionRegistryRpcStubHolder(org.apache.hadoop.conf.Configuration conf, User user, RpcControllerFactory rpcControllerFactory, Set<ServerName> bootstrapNodes) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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) voidrefreshStubs(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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-