Class KinesisPartitionGroupOffset
- java.lang.Object
-
- org.apache.pinot.plugin.stream.kinesis.KinesisPartitionGroupOffset
-
- All Implemented Interfaces:
Comparable<StreamPartitionMsgOffset>,StreamPartitionMsgOffset
public class KinesisPartitionGroupOffset extends Object implements StreamPartitionMsgOffset
AStreamPartitionMsgOffsetimplementation for the Kinesis partition group consumption A partition group consists of 1 or more shards. The KinesisCheckpoint maintains a Map of shards to the sequenceNumber. The sequenceNumber is the id (equivalent to offset in kafka) for the messages in the shard. From the Kinesis documentation: Each data record has a sequence number that is unique per partition-key within its shard. Kinesis Data Streams assigns the sequence number after you write to the stream with client.putRecords or client .putRecord. Sequence numbers for the same partition key generally increase over time. The longer the time period between write requests, the larger the sequence numbers become.
-
-
Constructor Summary
Constructors Constructor Description KinesisPartitionGroupOffset(String offsetStr)KinesisPartitionGroupOffset(Map<String,String> shardToStartSequenceMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(StreamPartitionMsgOffset o)KinesisPartitionGroupOffsetfromString(String kinesisCheckpointStr)Map<String,String>getShardToStartSequenceMap()StringtoString()
-
-
-
Constructor Detail
-
KinesisPartitionGroupOffset
public KinesisPartitionGroupOffset(Map<String,String> shardToStartSequenceMap)
-
KinesisPartitionGroupOffset
public KinesisPartitionGroupOffset(String offsetStr) throws IOException
- Throws:
IOException
-
-
Method Detail
-
toString
public String toString()
- Specified by:
toStringin interfaceStreamPartitionMsgOffset- Overrides:
toStringin classObject
-
fromString
public KinesisPartitionGroupOffset fromString(String kinesisCheckpointStr)
- Specified by:
fromStringin interfaceStreamPartitionMsgOffset
-
compareTo
public int compareTo(StreamPartitionMsgOffset o)
- Specified by:
compareToin interfaceComparable<StreamPartitionMsgOffset>
-
-