public final class CommitMetadataManager extends Object
Generates and reads commit metadata.
| Constructor and Description |
|---|
CommitMetadataManager(TopologyContext context,
KafkaSpoutConfig.ProcessingGuarantee processingGuarantee)
Create a manager with the given context.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCommitMetadata() |
boolean |
isOffsetCommittedByThisTopology(org.apache.kafka.common.TopicPartition tp,
org.apache.kafka.clients.consumer.OffsetAndMetadata committedOffset,
Map<org.apache.kafka.common.TopicPartition,OffsetManager> offsetManagers)
Checks if
OffsetAndMetadata was committed by a KafkaSpout instance in this topology. |
public CommitMetadataManager(TopologyContext context, KafkaSpoutConfig.ProcessingGuarantee processingGuarantee)
Create a manager with the given context.
public boolean isOffsetCommittedByThisTopology(org.apache.kafka.common.TopicPartition tp,
org.apache.kafka.clients.consumer.OffsetAndMetadata committedOffset,
Map<org.apache.kafka.common.TopicPartition,OffsetManager> offsetManagers)
Checks if OffsetAndMetadata was committed by a KafkaSpout instance in this topology.
tp - The topic partition the commit metadata belongs to.committedOffset - OffsetAndMetadata info committed to KafkaoffsetManagers - The offset managers.OffsetAndMetadata, false otherwisepublic String getCommitMetadata()
Copyright © 2021 The Apache Software Foundation. All rights reserved.