Package org.apache.pulsar.zookeeper
Class LocalBookkeeperEnsemble
java.lang.Object
org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected static final org.slf4j.Logger -
Constructor Summary
ConstructorsConstructorDescriptionLocalBookkeeperEnsemble(int numberOfBookies, int zkPort, int bkBasePort, int streamStoragePort, String zkDataDirName, String bkDataDirName, boolean clearOldData, String advertisedAddress) LocalBookkeeperEnsemble(int numberOfBookies, int zkPort, int bkBasePort, String zkDataDirName, String bkDataDirName, boolean clearOldData) LocalBookkeeperEnsemble(int numberOfBookies, int zkPort, int bkBasePort, String zkDataDirName, String bkDataDirName, boolean clearOldData, String advertisedAddress) LocalBookkeeperEnsemble(int numberOfBookies, int zkPort, int streamStoragePort, String zkDataDirName, String bkDataDirName, boolean clearOldData, String advertisedAddress, Supplier<Integer> portManager) LocalBookkeeperEnsemble(int numberOfBookies, int zkPort, Supplier<Integer> portManager) -
Method Summary
Modifier and TypeMethodDescriptionvoiddisconnectZookeeper(org.apache.zookeeper.ZooKeeper zooKeeper) org.apache.bookkeeper.proto.BookieServer[]just for testing, avoid direct access to the bookie to start/stop etc.org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.server.ZooKeeperServerintorg.apache.zookeeper.server.ServerCnxngetZookeeperServerConnection(org.apache.zookeeper.ZooKeeper zooKeeper) voidrunStreamStorage(org.apache.commons.configuration.CompositeConfiguration conf) voidstart()voidstart(boolean enableStreamStorage) voidstartBK()voidstartBK(int i) voidvoidstartStandalone(org.apache.bookkeeper.conf.ServerConfiguration conf, boolean enableStreamStorage) voidstop()voidstopBK()voidstopBK(int i) static booleanwaitForServerUp(String hp, long timeout)
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG -
CONNECTION_TIMEOUT
public static final int CONNECTION_TIMEOUT- See Also:
-
-
Constructor Details
-
LocalBookkeeperEnsemble
-
LocalBookkeeperEnsemble
-
LocalBookkeeperEnsemble
-
LocalBookkeeperEnsemble
-
LocalBookkeeperEnsemble
-
-
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
- Throws:
Exception
-
start
- Throws:
Exception
-
startStandalone
- 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
- Throws:
Exception
-
startBK
- Throws:
Exception
-
stop
- Throws:
Exception
-
waitForServerUp
-
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()
-