Package org.apache.pinot.spi.stream
Interface MessageBatch<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMessageBatch.LegacyStreamMessage
-
Method Summary
Modifier and Type Method Description TgetMessageAtIndex(int index)Deprecated.default byte[]getMessageBytesAtIndex(int index)intgetMessageCount()intgetMessageLengthAtIndex(int index)Returns the length of the message at a particular index inside a set of messages returned from the stream.intgetMessageOffsetAtIndex(int index)Returns the offset of the message at a particular index inside a set of messages returned from the stream.default RowMetadatagetMetadataAtIndex(int index)Returns the metadata associated with the message at a particular index.longgetNextStreamMessageOffsetAtIndex(int index)Deprecated.default StreamPartitionMsgOffsetgetNextStreamPartitionMsgOffsetAtIndex(int index)Returns the offset of the next message.default StreamPartitionMsgOffsetgetOffsetOfNextBatch()default StreamMessage<T>getStreamMessage(int index)default intgetUnfilteredMessageCount()default booleanisEndOfPartitionGroup()Returns true if end of the consumer detects that no more records can be read from this partition group for good
-
-
-
Method Detail
-
getMessageCount
int getMessageCount()
- Returns:
- number of available messages
-
getUnfilteredMessageCount
default int getUnfilteredMessageCount()
- Returns:
- number of messages returned from the stream
-
getMessageAtIndex
@Deprecated T getMessageAtIndex(int index)
Deprecated.Returns the message at a particular index inside a set of messages returned from the stream.- Parameters:
index-- Returns:
-
getMessageBytesAtIndex
default byte[] getMessageBytesAtIndex(int index)
-
getStreamMessage
default StreamMessage<T> getStreamMessage(int index)
-
getMessageOffsetAtIndex
int getMessageOffsetAtIndex(int index)
Returns the offset of the message at a particular index inside a set of messages returned from the stream.- Parameters:
index-- Returns:
-
getMessageLengthAtIndex
int getMessageLengthAtIndex(int index)
Returns the length of the message at a particular index inside a set of messages returned from the stream.- Parameters:
index-- Returns:
-
getMetadataAtIndex
default RowMetadata getMetadataAtIndex(int index)
Returns the metadata associated with the message at a particular index. This typically includes the timestamp when the message was ingested by the upstream stream-provider and other relevant metadata.
-
getNextStreamMessageOffsetAtIndex
@Deprecated long getNextStreamMessageOffsetAtIndex(int index)
Deprecated.Returns the offset of the next message.- Parameters:
index-- Returns:
-
getNextStreamPartitionMsgOffsetAtIndex
default StreamPartitionMsgOffset getNextStreamPartitionMsgOffsetAtIndex(int index)
Returns the offset of the next message.- Parameters:
index-- Returns:
-
getOffsetOfNextBatch
default StreamPartitionMsgOffset getOffsetOfNextBatch()
- Returns:
- last offset in the batch
-
isEndOfPartitionGroup
default boolean isEndOfPartitionGroup()
Returns true if end of the consumer detects that no more records can be read from this partition group for good
-
-