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

    Constructors
    Constructor
    Description
    BookKeeperTestClient(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 Type
    Method
    Description
    org.apache.bookkeeper.proto.BookieClient
     
    org.apache.bookkeeper.conf.ClientConfiguration
     
     
    org.apache.zookeeper.ZooKeeper
     
    void
    Force a read to zookeeper to get list of bookies.
    waitForReadOnlyBookie(org.apache.bookkeeper.net.BookieId b)
     
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getZkHandle

      public org.apache.zookeeper.ZooKeeper getZkHandle()
    • getConf

      public org.apache.bookkeeper.conf.ClientConfiguration getConf()
      Overrides:
      getConf in class org.apache.bookkeeper.client.BookKeeper
    • getBookieClient

      public org.apache.bookkeeper.proto.BookieClient getBookieClient()
    • waitForReadOnlyBookie

      public Future<?> waitForReadOnlyBookie(org.apache.bookkeeper.net.BookieId b) throws Exception
      Throws:
      Exception
    • waitForWritableBookie

      public Future<?> waitForWritableBookie(org.apache.bookkeeper.net.BookieId b) throws Exception
      Throws:
      Exception
    • readBookiesBlocking

      public void readBookiesBlocking() throws InterruptedException, org.apache.bookkeeper.client.BKException
      Force a read to zookeeper to get list of bookies.
      Throws:
      InterruptedException
      KeeperException
      org.apache.bookkeeper.client.BKException
    • getTestStatsProvider

      public TestStatsProvider getTestStatsProvider()