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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to