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
Modifier and TypeFieldDescriptionprivate final List<ServerName>
private final CompletableFuture<String>
private static final org.slf4j.Logger
private final RpcClient
private final RpcControllerFactory
private final User
-
Constructor Summary
ConstructorDescriptionClusterIdFetcher
(org.apache.hadoop.conf.Configuration conf, User user, RpcControllerFactory rpcControllerFactory, Set<ServerName> bootstrapServers) -
Method Summary
Modifier and TypeMethodDescription(package private) CompletableFuture<String>
private void
getClusterId
(int index) Try get cluster id from the server with the givenindex
inbootstrapServers
.
-
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 givenindex
inbootstrapServers
. -
fetchClusterId
-