Class CommitMetadataManager
java.lang.Object
org.apache.storm.kafka.spout.internal.CommitMetadataManager
Generates and reads commit metadata.
-
Constructor Summary
ConstructorDescriptionCommitMetadataManager
(TopologyContext context, KafkaSpoutConfig.ProcessingGuarantee processingGuarantee) Create a manager with the given context. -
Method Summary
Modifier and TypeMethodDescriptionboolean
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 Details
-
CommitMetadataManager
public CommitMetadataManager(TopologyContext context, KafkaSpoutConfig.ProcessingGuarantee processingGuarantee) Create a manager with the given context.
-
-
Method Details
-
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
-