tibrewalpratik17 commented on code in PR #12602:
URL: https://github.com/apache/pinot/pull/12602#discussion_r1527242837
##########
pinot-plugins/pinot-stream-ingestion/pinot-kafka-2.0/src/main/java/org/apache/pinot/plugin/stream/kafka20/KafkaStreamMessage.java:
##########
@@ -35,4 +35,12 @@ public long getNextOffset() {
}
return -1;
}
+
+ public long getOffset() {
+ if (_metadata != null) {
+ long offset =
Long.parseLong(_metadata.getRecordMetadata().get(KafkaStreamMessageMetadata.METADATA_OFFSET_KEY));
+ return offset < 0 ? -1 : offset;
Review Comment:
I referred the `getNextOffset` function for this. But we can just return
offset here. Updated
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]