java.lang.Object
org.apache.bookkeeper.bookie.storage.directentrylogger.Header

class Header extends Object
The 1K block at the head of the entry logger file that contains the fingerprint and meta-data.
 Header is composed of:
 Fingerprint: 4 bytes "BKLO"
 Log file HeaderVersion enum: 4 bytes
 Ledger map offset: 8 bytes
 Ledgers Count: 4 bytes
 
  • Field Details

  • Constructor Details

    • Header

      Header()
  • Method Details

    • extractVersion

      static int extractVersion(io.netty.buffer.ByteBuf header) throws IOException
      Throws:
      IOException
    • extractLedgerMapOffset

      static long extractLedgerMapOffset(io.netty.buffer.ByteBuf header) throws IOException
      Throws:
      IOException
    • extractLedgerCount

      static int extractLedgerCount(io.netty.buffer.ByteBuf header) throws IOException
      Throws:
      IOException
    • assertFingerPrint

      static void assertFingerPrint(io.netty.buffer.ByteBuf header) throws IOException
      Throws:
      IOException
    • writeEmptyHeader

      static void writeEmptyHeader(io.netty.buffer.ByteBuf header) throws IOException
      Throws:
      IOException
    • writeHeader

      static void writeHeader(io.netty.buffer.ByteBuf header, long ledgerMapOffset, int ledgerCount) throws IOException
      Throws:
      IOException