Class CommitMetadataManager
- java.lang.Object
-
- org.apache.storm.kafka.spout.internal.CommitMetadataManager
-
public final class CommitMetadataManager extends Object
Generates and reads commit metadata.
-
-
Constructor Summary
Constructors Constructor Description CommitMetadataManager(TopologyContext context, KafkaSpoutConfig.ProcessingGuarantee processingGuarantee)
Create a manager with the given context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 ifOffsetAndMetadata
was committed by aKafkaSpout
instance in this topology.
-
-
-
Constructor Detail
-
CommitMetadataManager
public CommitMetadataManager(TopologyContext context, KafkaSpoutConfig.ProcessingGuarantee processingGuarantee)
Create a manager with the given context.
-
-
Method Detail
-
isOffsetCommittedByThisTopology
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 ifOffsetAndMetadata
was committed by aKafkaSpout
instance in this topology.- Parameters:
tp
- The topic partition the commit metadata belongs to.committedOffset
-OffsetAndMetadata
info committed to KafkaoffsetManagers
- The offset managers.- Returns:
- true if this topology committed this
OffsetAndMetadata
, false otherwise
-
getCommitMetadata
public String getCommitMetadata()
-
-