Class ZKMetadataDriverBase

  • All Implemented Interfaces:
    java.lang.AutoCloseable
    Direct Known Subclasses:
    ZKMetadataBookieDriver, ZKMetadataClientDriver

    public class ZKMetadataDriverBase
    extends java.lang.Object
    implements java.lang.AutoCloseable
    This is a mixin class for supporting zookeeper based metadata driver.
    • Field Detail

      • metadataServiceAvailable

        protected volatile boolean metadataServiceAvailable
      • acls

        protected java.util.List<org.apache.zookeeper.data.ACL> acls
      • zk

        protected org.apache.zookeeper.ZooKeeper zk
      • ownZKHandle

        protected boolean ownZKHandle
      • disableHealthCheckPath

        java.lang.String disableHealthCheckPath
      • ledgersRootPath

        protected java.lang.String ledgersRootPath
    • Constructor Detail

      • ZKMetadataDriverBase

        public ZKMetadataDriverBase()
    • Method Detail

      • getZKServersFromServiceUri

        public static java.lang.String getZKServersFromServiceUri​(java.net.URI uri)
      • resolveZkLedgersRootPath

        public static java.lang.String resolveZkLedgersRootPath​(AbstractConfiguration<?> conf)
      • resolveLedgerManagerFactory

        public static java.lang.Class<? extends LedgerManagerFactory> resolveLedgerManagerFactory​(java.net.URI metadataServiceUri)
      • getScheme

        public java.lang.String getScheme()
      • disableHealthCheck

        public java.util.concurrent.CompletableFuture<java.lang.Void> disableHealthCheck()
      • enableHealthCheck

        public java.util.concurrent.CompletableFuture<java.lang.Void> enableHealthCheck()
      • isHealthCheckEnabled

        public java.util.concurrent.CompletableFuture<java.lang.Boolean> isHealthCheckEnabled()
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • getZk

        public org.apache.zookeeper.ZooKeeper getZk()
      • setZk

        public void setZk​(org.apache.zookeeper.ZooKeeper zk)