Package org.apache.bookkeeper.client
Class LedgerChecker
java.lang.Object
org.apache.bookkeeper.client.LedgerChecker
A utility class to check the complete ledger and finds the UnderReplicated fragments if any.
NOTE: This class is tended to be used by this project only. External users should not rely on it directly.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal BookieClientfinal BookieWatcher(package private) final Semaphore -
Constructor Summary
ConstructorsConstructorDescriptionLedgerChecker(BookKeeper bkc) LedgerChecker(BookKeeper bkc, int inFlightReadEntryNum) LedgerChecker(BookieClient client, BookieWatcher watcher) LedgerChecker(BookieClient client, BookieWatcher watcher, int inFlightReadEntryNum) -
Method Summary
Modifier and TypeMethodDescriptionvoidAcquires a permit from permit manager, blocking until all are available.voidCheck that all the fragments in the passed in ledger, and report those which are missing.voidcheckLedger(LedgerHandle lh, BookkeeperInternalCallbacks.GenericCallback<Set<LedgerFragment>> cb, long percentageOfLedgerFragmentToBeVerified) voidRelease a given permit.
-
Field Details
-
bookieClient
-
bookieWatcher
-
semaphore
-
-
Constructor Details
-
LedgerChecker
-
LedgerChecker
-
LedgerChecker
-
LedgerChecker
-
-
Method Details
-
acquirePermit
Acquires a permit from permit manager, blocking until all are available.- Throws:
InterruptedException
-
releasePermit
public void releasePermit()Release a given permit. -
checkLedger
public void checkLedger(LedgerHandle lh, BookkeeperInternalCallbacks.GenericCallback<Set<LedgerFragment>> cb) Check that all the fragments in the passed in ledger, and report those which are missing. -
checkLedger
public void checkLedger(LedgerHandle lh, BookkeeperInternalCallbacks.GenericCallback<Set<LedgerFragment>> cb, long percentageOfLedgerFragmentToBeVerified)
-