Package org.apache.pinot.spi.stream
Class PartitionGroupConsumptionStatus
- java.lang.Object
-
- org.apache.pinot.spi.stream.PartitionGroupConsumptionStatus
-
public class PartitionGroupConsumptionStatus extends Object
A PartitionGroup is a group of partitions/shards that the same consumer should consume from. This class contains all information which describes the latest state of a partition group. It is constructed by looking at the segment zk metadata of the latest segment of each partition group. It consists of: 1. partitionGroupId - A unique ID for the partitionGroup 2. sequenceNumber - The sequenceNumber this partitionGroup is currently at 3. startOffset - The start offset that the latest segment started consuming from 4. endOffset - The endOffset (if segment consuming from this partition group has finished consuming the segment and recorded the end offset) 5. status - the consumption status IN_PROGRESS/DONE This information is needed by the stream, when grouping the partitions/shards into new partition groups.
-
-
Constructor Summary
Constructors Constructor Description PartitionGroupConsumptionStatus(int partitionGroupId, int sequenceNumber, StreamPartitionMsgOffset startOffset, StreamPartitionMsgOffset endOffset, String status)
-
Method Summary
Modifier and Type Method Description StreamPartitionMsgOffsetgetEndOffset()intgetPartitionGroupId()intgetSequenceNumber()StreamPartitionMsgOffsetgetStartOffset()StringgetStatus()voidsetEndOffset(StreamPartitionMsgOffset endOffset)voidsetSequenceNumber(int sequenceNumber)voidsetStartOffset(StreamPartitionMsgOffset startOffset)voidsetStatus(String status)
-
-
-
Constructor Detail
-
PartitionGroupConsumptionStatus
public PartitionGroupConsumptionStatus(int partitionGroupId, int sequenceNumber, StreamPartitionMsgOffset startOffset, StreamPartitionMsgOffset endOffset, String status)
-
-
Method Detail
-
getPartitionGroupId
public int getPartitionGroupId()
-
getSequenceNumber
public int getSequenceNumber()
-
setSequenceNumber
public void setSequenceNumber(int sequenceNumber)
-
getStartOffset
public StreamPartitionMsgOffset getStartOffset()
-
setStartOffset
public void setStartOffset(StreamPartitionMsgOffset startOffset)
-
getEndOffset
public StreamPartitionMsgOffset getEndOffset()
-
setEndOffset
public void setEndOffset(StreamPartitionMsgOffset endOffset)
-
getStatus
public String getStatus()
-
setStatus
public void setStatus(String status)
-
-