Class LedgerMetadataUtils

java.lang.Object
org.apache.bookkeeper.mledger.impl.LedgerMetadataUtils

public final class LedgerMetadataUtils extends Object
Utilities for managing BookKeeper Ledgers custom metadata.
  • Method Details

    • buildMetadataForCompactedLedger

      public static Map<String,byte[]> buildMetadataForCompactedLedger(String compactedTopic, byte[] compactedToMessageId)
      Build additional metadata for a CompactedLedger.
      Parameters:
      compactedTopic - reference to the compacted topic.
      compactedToMessageId - last mesasgeId.
      Returns:
      an immutable map which describes the compacted ledger
    • buildMetadataForSchema

      public static Map<String,byte[]> buildMetadataForSchema(String schemaId)
      Build additional metadata for a Schema.
      Parameters:
      schemaId - id of the schema
      Returns:
      an immutable map which describes the schema
    • buildMetadataForDelayedIndexBucket

      public static Map<String,byte[]> buildMetadataForDelayedIndexBucket(String bucketKey, String topicName, String cursorName)
      Build additional metadata for a delayed message index bucket.
      Parameters:
      bucketKey - key of the delayed message bucket
      topicName - name of the topic
      cursorName - name of the cursor
      Returns:
      an immutable map which describes the schema