@ThreadSafe public final class ZkMasterInquireClient extends Object implements MasterInquireClient, Closeable
Modifier and Type | Class and Description |
---|---|
static class |
ZkMasterInquireClient.ZkMasterConnectDetails
Details used to connect to the leader Alluxio master via Zookeeper.
|
MasterInquireClient.ConnectDetails, MasterInquireClient.Factory
Modifier and Type | Method and Description |
---|---|
void |
close() |
static ZkMasterInquireClient |
getClient(String zookeeperAddress,
String electionPath,
String leaderPath,
int inquireRetryCount,
boolean authEnabled)
Gets the client.
|
MasterInquireClient.ConnectDetails |
getConnectDetails()
Returns canonical connect details representing how this client connects to the master.
|
List<InetSocketAddress> |
getMasterRpcAddresses() |
InetSocketAddress |
getPrimaryRpcAddress() |
public static ZkMasterInquireClient getClient(String zookeeperAddress, String electionPath, String leaderPath, int inquireRetryCount, boolean authEnabled)
zookeeperAddress
- the address for ZookeeperelectionPath
- the path of the master electionleaderPath
- the path of the leaderinquireRetryCount
- the number of times to retry connectionsauthEnabled
- if Alluxio client-side auth is enabledpublic InetSocketAddress getPrimaryRpcAddress() throws UnavailableException
getPrimaryRpcAddress
in interface MasterInquireClient
UnavailableException
- if the primary rpc address cannot be determinedpublic List<InetSocketAddress> getMasterRpcAddresses() throws UnavailableException
getMasterRpcAddresses
in interface MasterInquireClient
UnavailableException
- if the master rpc addresses cannot be determinedpublic void close()
close
in interface Closeable
close
in interface AutoCloseable
public MasterInquireClient.ConnectDetails getConnectDetails()
MasterInquireClient
getConnectDetails
in interface MasterInquireClient
Copyright © 2023. All Rights Reserved.