mcvsubbu commented on a change in pull request #4025: Extend stream interfaces 
to expose message metadata like ingestion timestamp
URL: https://github.com/apache/incubator-pinot/pull/4025#discussion_r270246606
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/indexsegment/mutable/MutableSegment.java
 ##########
 @@ -32,10 +33,40 @@
    */
   boolean index(GenericRow row);
 
+  /**
+   * Indexes a record into the segment with optionally provided metadata.
+   *
+   * @param row Record represented as a {@link GenericRow}
+   * @param msgMetadata the metadata associated with the message
+   * @return Whether the segment is full (i.e. cannot index more record into 
it)
+   */
+  default boolean index(GenericRow row, StreamMessageMetadata msgMetadata) {
+    // by default call the non-metadata based method for backward compatibility
+    return index(row);
+  }
+
   /**
    * Returns the number of records already indexed into the segment.
    *
    * @return The number of records indexed
    */
   int getNumDocsIndexed();
+
+  /**
+   * Returns the latest indexed timestamp for the segment.
+   *
+   * @return the timestamp of last message indexed
+   */
+  default Long getLastIndexedTimestamp() {
 
 Review comment:
   same

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to