Package org.apache.storm.kafka.spout.internal

# 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

  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 if `OffsetAndMetadata` was committed by a `KafkaSpout` instance in this topology.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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 if `OffsetAndMetadata` was committed by a `KafkaSpout` instance in this topology.
    Parameters:
      `tp` - The topic partition the commit metadata belongs to.
      `committedOffset` - `OffsetAndMetadata` info committed to Kafka
      `offsetManagers` - The offset managers.
    Returns:
      true if this topology committed this `OffsetAndMetadata`, false otherwise

  - ### getCommitMetadata

    public String getCommitMetadata()