Package org.apache.bookkeeper.client
Class BookKeeperTestClient
java.lang.Object
org.apache.bookkeeper.client.BookKeeper
org.apache.bookkeeper.client.BookKeeperTestClient
- All Implemented Interfaces:
AutoCloseable,org.apache.bookkeeper.client.api.BookKeeper
public class BookKeeperTestClient
extends org.apache.bookkeeper.client.BookKeeper
Test BookKeeperClient which allows access to members we don't
wish to expose in the public API.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.bookkeeper.client.BookKeeper
org.apache.bookkeeper.client.BookKeeper.Builder, org.apache.bookkeeper.client.BookKeeper.DigestType -
Constructor Summary
ConstructorsConstructorDescriptionBookKeeperTestClient(org.apache.bookkeeper.conf.ClientConfiguration conf) BookKeeperTestClient(org.apache.bookkeeper.conf.ClientConfiguration conf, TestStatsProvider statsProvider) BookKeeperTestClient(org.apache.bookkeeper.conf.ClientConfiguration conf, org.apache.zookeeper.ZooKeeper zkc) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.bookkeeper.proto.BookieClientorg.apache.bookkeeper.conf.ClientConfigurationgetConf()org.apache.zookeeper.ZooKeepervoidForce a read to zookeeper to get list of bookies.Future<?>waitForReadOnlyBookie(org.apache.bookkeeper.net.BookieId b) Future<?>waitForWritableBookie(org.apache.bookkeeper.net.BookieId b) Methods inherited from class org.apache.bookkeeper.client.BookKeeper
asyncCreateLedger, asyncCreateLedger, asyncCreateLedgerAdv, asyncCreateLedgerAdv, asyncDeleteLedger, asyncIsClosed, asyncOpenLedger, asyncOpenLedgerNoRecovery, close, createLedger, createLedger, createLedger, createLedger, createLedgerAdv, createLedgerAdv, createLedgerAdv, deleteLedger, forConfig, getBookieAddressResolver, getBookieInfo, getClientCtx, getLedgerManager, getLedgerManagerFactory, getLedgerMetadata, getMainWorkerPool, getMetadataClientDriver, initializeEnsemblePlacementPolicy, isClosed, newCreateLedgerOp, newDeleteLedgerOp, newListLedgersOp, newOpenLedgerOp, openLedger, openLedgerNoRecovery
-
Constructor Details
-
BookKeeperTestClient
public BookKeeperTestClient(org.apache.bookkeeper.conf.ClientConfiguration conf, TestStatsProvider statsProvider) throws IOException, InterruptedException, org.apache.bookkeeper.client.BKException - Throws:
IOExceptionInterruptedExceptionorg.apache.bookkeeper.client.BKException
-
BookKeeperTestClient
public BookKeeperTestClient(org.apache.bookkeeper.conf.ClientConfiguration conf, org.apache.zookeeper.ZooKeeper zkc) throws IOException, InterruptedException, org.apache.bookkeeper.client.BKException - Throws:
IOExceptionInterruptedExceptionorg.apache.bookkeeper.client.BKException
-
BookKeeperTestClient
public BookKeeperTestClient(org.apache.bookkeeper.conf.ClientConfiguration conf) throws InterruptedException, org.apache.bookkeeper.client.BKException, IOException - Throws:
InterruptedExceptionorg.apache.bookkeeper.client.BKExceptionIOException
-
-
Method Details
-
getZkHandle
public org.apache.zookeeper.ZooKeeper getZkHandle() -
getConf
public org.apache.bookkeeper.conf.ClientConfiguration getConf()- Overrides:
getConfin classorg.apache.bookkeeper.client.BookKeeper
-
getBookieClient
public org.apache.bookkeeper.proto.BookieClient getBookieClient() -
waitForReadOnlyBookie
- Throws:
Exception
-
waitForWritableBookie
- Throws:
Exception
-
readBookiesBlocking
public void readBookiesBlocking() throws InterruptedException, org.apache.bookkeeper.client.BKExceptionForce a read to zookeeper to get list of bookies.- Throws:
InterruptedExceptionKeeperExceptionorg.apache.bookkeeper.client.BKException
-
getTestStatsProvider
-