Interface for entrylogger
authorIvan Kelly <ikelly@splunk.com>
Thu, 27 Aug 2020 18:09:31 +0000 (19:09 +0100)
committermauricebarnum <maurice.barnum@gmail.com>
Thu, 7 Apr 2022 05:48:08 +0000 (22:48 -0700)
commitc927f4b0128e2b1f0f4b30c41ce442b366d5009c
treeedd3514dd1073ac133f04b0da568e314a1a37f1f
parent67c963a1b02de04166778d906f4cffe89dd86562
Interface for entrylogger

Define the interface and contract for entrylogger. This is mostly
taking the entrylogger methods used by other components and prettying
them up a bit.

Notable changes are:
- internalReadEntry is now readEntry. There is no 'validate'
  flag. Instead there are two overloads for the method, and validation
  only runs if ledgerId and entryId are passed in.
- shutdown has been renamed to close.
- the compaction entrylog methods have been put behind an
  interface. As it was they were leaking implementation
  details. Ultimitely compaction itself should be hidden behind the
  entrylogger, but that's a larger refactor.
27 files changed:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/AbstractLogCompactor.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/CompactableLedgerStorage.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogCompactor.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedLedgerStorage.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/InterleavedStorageRegenerateIndexOp.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/ReadOnlyEntryLogger.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/SortedLedgerStorage.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/TransactionalEntryLogCompactor.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/CompactionEntryLog.java [new file with mode: 0644]
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/EntryLogScanner.java [new file with mode: 0644]
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/EntryLoggerIface.java [new file with mode: 0644]
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/LedgersIndexRebuildOp.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/LocationsIndexRebuildOp.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/SingleDirectoryDbLedgerStorage.java
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/package-info.java [new file with mode: 0644]
bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/cli/commands/bookie/ReadLogCommand.java
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/CompactionTest.java
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/CreateNewLogTest.java
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/EntryLogTest.java
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/LedgerStorageCheckpointTest.java
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/SlowInterleavedLedgerStorage.java
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/SortedLedgerStorageCheckpointTest.java
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/storage/ldb/DbLedgerStorageTest.java
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ZooKeeperCluster.java
tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/bookie/ReadLogCommandTest.java