Class LedgerMetadataUtils
java.lang.Object
org.apache.bookkeeper.mledger.impl.LedgerMetadataUtils
Utilities for managing BookKeeper Ledgers custom metadata.
-
Method Summary
Modifier and TypeMethodDescriptionbuildMetadataForCompactedLedger(String compactedTopic, byte[] compactedToMessageId) Build additional metadata for a CompactedLedger.buildMetadataForDelayedIndexBucket(String bucketKey, String topicName, String cursorName) Build additional metadata for a delayed message index bucket.buildMetadataForSchema(String schemaId) Build additional metadata for a Schema.
-
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
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 buckettopicName- name of the topiccursorName- name of the cursor- Returns:
- an immutable map which describes the schema
-