Package org.apache.hadoop.hbase.client
Class ClusterIdFetcher
java.lang.Object
org.apache.hadoop.hbase.client.ClusterIdFetcher
Fetch cluster id through special preamble header.
An instance of this class should only be used once, like:
new ClusterIdFetcher().fetchClusterId()Calling the fetchClusterId multiple times will lead unexpected behavior.
See HBASE-25051 for more details.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ServerName>private final CompletableFuture<String>private static final org.slf4j.Loggerprivate final RpcClientprivate final RpcControllerFactoryprivate final User -
Constructor Summary
ConstructorsConstructorDescriptionClusterIdFetcher(org.apache.hadoop.conf.Configuration conf, User user, RpcControllerFactory rpcControllerFactory, Set<ServerName> bootstrapServers) -
Method Summary
Modifier and TypeMethodDescription(package private) CompletableFuture<String>private voidgetClusterId(int index) Try get cluster id from the server with the givenindexinbootstrapServers.
-
Field Details
-
LOG
-
bootstrapServers
-
user
-
rpcClient
-
rpcControllerFactory
-
future
-
-
Constructor Details
-
ClusterIdFetcher
ClusterIdFetcher(org.apache.hadoop.conf.Configuration conf, User user, RpcControllerFactory rpcControllerFactory, Set<ServerName> bootstrapServers)
-
-
Method Details
-
getClusterId
Try get cluster id from the server with the givenindexinbootstrapServers. -
fetchClusterId
-