Class BookkeeperVerifier


  • public class BookkeeperVerifier
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      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 Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()
      This is the method used to invoke the main loop of the IO driver.
      • Methods inherited from class java.lang.Object

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

      • 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 Detail

      • run

        public void run()
                 throws java.lang.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:
        java.lang.Exception