Class LocalBookkeeperEnsemble

java.lang.Object
org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble

public class LocalBookkeeperEnsemble extends Object
  • Field Details

    • LOG

      protected static final org.slf4j.Logger LOG
    • CONNECTION_TIMEOUT

      public static final int CONNECTION_TIMEOUT
      See Also:
  • Constructor Details

    • LocalBookkeeperEnsemble

      public LocalBookkeeperEnsemble(int numberOfBookies, int zkPort, Supplier<Integer> portManager)
    • LocalBookkeeperEnsemble

      public LocalBookkeeperEnsemble(int numberOfBookies, int zkPort, int bkBasePort, String zkDataDirName, String bkDataDirName, boolean clearOldData)
    • LocalBookkeeperEnsemble

      public LocalBookkeeperEnsemble(int numberOfBookies, int zkPort, int bkBasePort, String zkDataDirName, String bkDataDirName, boolean clearOldData, String advertisedAddress)
    • LocalBookkeeperEnsemble

      public LocalBookkeeperEnsemble(int numberOfBookies, int zkPort, int bkBasePort, int streamStoragePort, String zkDataDirName, String bkDataDirName, boolean clearOldData, String advertisedAddress)
    • LocalBookkeeperEnsemble

      public LocalBookkeeperEnsemble(int numberOfBookies, int zkPort, int streamStoragePort, String zkDataDirName, String bkDataDirName, boolean clearOldData, String advertisedAddress, Supplier<Integer> portManager)
  • Method Details

    • disconnectZookeeper

      public void disconnectZookeeper(org.apache.zookeeper.ZooKeeper zooKeeper)
    • getZookeeperServerConnection

      public org.apache.zookeeper.server.ServerCnxn getZookeeperServerConnection(org.apache.zookeeper.ZooKeeper zooKeeper)
    • runStreamStorage

      public void runStreamStorage(org.apache.commons.configuration.CompositeConfiguration conf) throws Exception
      Throws:
      Exception
    • start

      public void start(boolean enableStreamStorage) throws Exception
      Throws:
      Exception
    • start

      public void start() throws Exception
      Throws:
      Exception
    • startStandalone

      public void startStandalone() throws Exception
      Throws:
      Exception
    • startStandalone

      public void startStandalone(org.apache.bookkeeper.conf.ServerConfiguration conf, boolean enableStreamStorage) throws Exception
      Throws:
      Exception
    • stopBK

      public void stopBK(int i)
    • stopBK

      public void stopBK()
    • startBK

      public void startBK(int i) throws Exception
      Throws:
      Exception
    • startBK

      public void startBK() throws Exception
      Throws:
      Exception
    • stop

      public void stop() throws Exception
      Throws:
      Exception
    • waitForServerUp

      public static boolean waitForServerUp(String hp, long timeout)
    • getZkClient

      public org.apache.zookeeper.ZooKeeper getZkClient()
    • getZkServer

      public org.apache.zookeeper.server.ZooKeeperServer getZkServer()
    • getBookies

      public org.apache.bookkeeper.proto.BookieServer[] getBookies()
      just for testing, avoid direct access to the bookie to start/stop etc.
      Returns:
      bookies
    • getZookeeperPort

      public int getZookeeperPort()