Class AbstractZkLedgerManagerFactory

    • Constructor Detail

      • AbstractZkLedgerManagerFactory

        public AbstractZkLedgerManagerFactory()
    • Method Detail

      • format

        public void format​(AbstractConfiguration<?> conf,
                           LayoutManager layoutManager)
                    throws java.lang.InterruptedException,
                           org.apache.zookeeper.KeeperException,
                           java.io.IOException
        Description copied from interface: LedgerManagerFactory
        Format the ledger metadata for LedgerManager.
        Specified by:
        format in interface LedgerManagerFactory
        Parameters:
        conf - Configuration instance
        layoutManager - Layout manager
        Throws:
        java.lang.InterruptedException
        org.apache.zookeeper.KeeperException
        java.io.IOException
      • validateAndNukeExistingCluster

        public boolean validateAndNukeExistingCluster​(AbstractConfiguration<?> conf,
                                                      LayoutManager layoutManager)
                                               throws java.lang.InterruptedException,
                                                      org.apache.zookeeper.KeeperException,
                                                      java.io.IOException
        Description copied from interface: LedgerManagerFactory
        This method makes sure there are no unexpected znodes under ledgersRootPath and then it proceeds with ledger metadata formatting and nuking the cluster ZK state info.
        Specified by:
        validateAndNukeExistingCluster in interface LedgerManagerFactory
        Parameters:
        conf - Configuration instance
        layoutManager - Layout manager
        Throws:
        java.lang.InterruptedException
        org.apache.zookeeper.KeeperException
        java.io.IOException
      • newLedgerManagerFactory

        public static LedgerManagerFactory newLedgerManagerFactory​(AbstractConfiguration<?> conf,
                                                                   LayoutManager layoutManager)
                                                            throws java.io.IOException,
                                                                   java.lang.InterruptedException
        Create new Ledger Manager Factory.
        Parameters:
        conf - Configuration Object.
        layoutManager - layout manager
        Returns:
        new ledger manager factory
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • createNewLMFactory

        protected static LedgerManagerFactory createNewLMFactory​(AbstractConfiguration conf,
                                                                 LayoutManager layoutManager,
                                                                 java.lang.Class<? extends LedgerManagerFactory> factoryClass)
                                                          throws java.io.IOException,
                                                                 java.lang.InterruptedException
        Creates the new layout and stores in zookeeper and returns the LedgerManagerFactory instance.
        Throws:
        java.io.IOException
        java.lang.InterruptedException