@InterfaceAudience.Private class ClusterIdFetcher extends Object
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.
Modifier and Type | Field and Description |
---|---|
private List<ServerName> |
bootstrapServers |
private CompletableFuture<String> |
future |
private static org.slf4j.Logger |
LOG |
private RpcClient |
rpcClient |
private RpcControllerFactory |
rpcControllerFactory |
private User |
user |
Constructor and Description |
---|
ClusterIdFetcher(org.apache.hadoop.conf.Configuration conf,
User user,
RpcControllerFactory rpcControllerFactory,
Set<ServerName> bootstrapServers) |
Modifier and Type | Method and Description |
---|---|
(package private) CompletableFuture<String> |
fetchClusterId() |
private void |
getClusterId(int index)
Try get cluster id from the server with the given
index in bootstrapServers . |
private static final org.slf4j.Logger LOG
private final List<ServerName> bootstrapServers
private final RpcControllerFactory rpcControllerFactory
private final CompletableFuture<String> future
ClusterIdFetcher(org.apache.hadoop.conf.Configuration conf, User user, RpcControllerFactory rpcControllerFactory, Set<ServerName> bootstrapServers)
private void getClusterId(int index)
index
in bootstrapServers
.CompletableFuture<String> fetchClusterId()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.