Class BookkeeperVerifier

java.lang.Object
org.apache.bookkeeper.verifier.BookkeeperVerifier

public class BookkeeperVerifier extends Object
Encapsulates logic for playing and verifying operations against a bookkeeper-like interface. The test state consists of a set of ledgers in 1 of several states: 1) opening -- waiting for driver to complete open 2) open -- valid targets for reads and writes 3) live -- valid targets for reads 4) deleting Each ledger moves in sequence through these states. See startWrite for the code driving the lifecycle.
  • Constructor Details

    • BookkeeperVerifier

      BookkeeperVerifier(BookkeeperVerifier.BookkeeperDriver driver, int ensembleSize, int writeQuorum, int ackQuorum, int duration, int drainTimeout, int targetConcurrentLedgers, int targetConcurrentWrites, int targetWriteGroup, int targetReadGroup, int targetLedgers, long targetLedgerSize, int targetEntrySize, int targetConcurrentReads, double coldToHotRatio)
  • Method Details

    • run

      public void run() throws Exception
      This is the method used to invoke the main loop of the IO driver. run() will loop starting IO requests until the time runs out on the test and all outstanding requests complete. Test execution state is accessed only under the instance lock for 'this'. There is no fine grained locking, hence run() simply needs to be synchronized and can wait for IOs to complete atomically with startWrite and startRead returning false (see those comments).
      Throws:
      Exception