Class ZkMasterInquireClient

  • All Implemented Interfaces:
    MasterInquireClient, java.io.Closeable, java.lang.AutoCloseable

    @ThreadSafe
    public final class ZkMasterInquireClient
    extends java.lang.Object
    implements MasterInquireClient, java.io.Closeable
    Utility to get leader from zookeeper.
    • Method Detail

      • getClient

        public static ZkMasterInquireClient getClient​(java.lang.String zookeeperAddress,
                                                      java.lang.String electionPath,
                                                      java.lang.String leaderPath,
                                                      int inquireRetryCount,
                                                      boolean authEnabled)
        Gets the client.
        Parameters:
        zookeeperAddress - the address for Zookeeper
        electionPath - the path of the master election
        leaderPath - the path of the leader
        inquireRetryCount - the number of times to retry connections
        authEnabled - if Alluxio client-side auth is enabled
        Returns:
        the client
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable