Class LogMetadata
- java.lang.Object
-
- org.apache.bookkeeper.bookie.storage.directentrylogger.LogMetadata
-
class LogMetadata extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static long
INVALID_LID
(package private) static long
LEDGERS_MAP_ENTRY_ID
(package private) static int
LEDGERS_MAP_ENTRY_SIZE
(package private) static int
LEDGERS_MAP_HEADER_SIZE
Ledgers map is composed of multiple parts that can be split into separated entries.(package private) static int
LEDGERS_MAP_MAX_BATCH_SIZE
(package private) static int
LEDGERS_MAP_MAX_MAP_SIZE
-
Constructor Summary
Constructors Constructor Description LogMetadata()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static EntryLogMetadata
read(LogReader reader)
(package private) static void
write(LogWriter writer, EntryLogMetadata metadata, io.netty.buffer.ByteBufAllocator allocator)
-
-
-
Field Detail
-
LEDGERS_MAP_HEADER_SIZE
static final int LEDGERS_MAP_HEADER_SIZE
Ledgers map is composed of multiple parts that can be split into separated entries. Each of them is composed of:length: (4 bytes) [0-3] ledger id (-1): (8 bytes) [4 - 11] entry id: (8 bytes) [12-19] num ledgers stored in current metadata entry: (4 bytes) [20 - 23] ledger entries: sequence of (ledgerid, size) (8 + 8 bytes each) [24..]
- See Also:
- Constant Field Values
-
LEDGERS_MAP_ENTRY_SIZE
static final int LEDGERS_MAP_ENTRY_SIZE
- See Also:
- Constant Field Values
-
LEDGERS_MAP_MAX_BATCH_SIZE
static final int LEDGERS_MAP_MAX_BATCH_SIZE
- See Also:
- Constant Field Values
-
LEDGERS_MAP_MAX_MAP_SIZE
static final int LEDGERS_MAP_MAX_MAP_SIZE
- See Also:
- Constant Field Values
-
INVALID_LID
static final long INVALID_LID
- See Also:
- Constant Field Values
-
LEDGERS_MAP_ENTRY_ID
static final long LEDGERS_MAP_ENTRY_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
write
static void write(LogWriter writer, EntryLogMetadata metadata, io.netty.buffer.ByteBufAllocator allocator) throws java.io.IOException
- Throws:
java.io.IOException
-
read
static EntryLogMetadata read(LogReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
-