Class KafkaTridentSpoutBatchMetadata

java.lang.Object
org.apache.storm.kafka.spout.trident.KafkaTridentSpoutBatchMetadata
All Implemented Interfaces:
Serializable

public class KafkaTridentSpoutBatchMetadata extends Object implements Serializable
Wraps transaction batch information.
See Also:
  • Field Details

  • Constructor Details

    • KafkaTridentSpoutBatchMetadata

      public KafkaTridentSpoutBatchMetadata(long firstOffset, long lastOffset, String topologyId)
      Builds a metadata object.
      Parameters:
      firstOffset - The first offset for the batch
      lastOffset - The last offset for the batch
  • Method Details

    • getFirstOffset

      public long getFirstOffset()
    • getLastOffset

      public long getLastOffset()
    • getTopologyId

      public String getTopologyId()
    • fromMap

      public static KafkaTridentSpoutBatchMetadata fromMap(Map<String,Object> map)
      Constructs a metadata object from a Map in the format produced by toMap().
      Parameters:
      map - The source map
      Returns:
      A new metadata object
    • toMap

      public Map<String,Object> toMap()
      Writes this metadata object to a Map so Trident can read/write it to Zookeeper.
    • toString

      public final String toString()
      Overrides:
      toString in class Object