Package org.apache.bookkeeper.verifier
Class BookkeeperVerifier
- java.lang.Object
-
- org.apache.bookkeeper.verifier.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
BookkeeperVerifier.BookkeeperDriver
Provides an interface for translating test operations into operations on a cluster.(package private) class
BookkeeperVerifier.EntryInfo
State required to regenerate an entry.(package private) class
BookkeeperVerifier.LedgerInfo
Contains the state required to reconstruct the contents of any entry in the ledger.(package private) class
BookkeeperVerifier.WriteCallback
-
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.
-
-
-
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
-
-