Package org.apache.bookkeeper.verifier
Class BookkeeperVerifier
java.lang.Object
org.apache.bookkeeper.verifier.BookkeeperVerifier
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 ClassesModifier and TypeClassDescriptionstatic interfaceProvides an interface for translating test operations into operations on a cluster.(package private) classState required to regenerate an entry.(package private) classContains the state required to reconstruct the contents of any entry in the ledger.(package private) class -
Constructor Summary
ConstructorsConstructorDescriptionBookkeeperVerifier(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
Modifier and TypeMethodDescriptionvoidrun()This is the method used to invoke the main loop of the IO driver.
-
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
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
-