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_r270247497
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/realtime/stream/StreamMessageDecoder.java
##########
@@ -54,4 +54,40 @@ void init(Map<String, String> props, Schema indexingSchema,
String topicName)
* @return A new row decoded from the buffer
*/
GenericRow decode(T payload, int offset, int length, GenericRow destination);
+
+ /**
+ * Decodes the payload received into a generic row and optionally returns
any metadata associated
+ * with the message.
+ *
+ * This is an interface default method is provided for backward
compatibility and should be
+ * overridden by implementations that can provide meaningful metadata.
+ *
+ * @param payload the message payload
+ * @param destination The {@link GenericRow} to write the decoded row into
+ * @param metadata The {@link StreamMessageMetadata} associated with the
message
+ * @return A new row decoded from the buffer
+ */
+ default GenericRow decode(T payload, GenericRow destination,
StreamMessageMetadata metadata) {
+ // by default, invoke the non-metadata based method for backwards
compatibility
+ return decode(payload, destination);
+ }
+
+ /**
+ * Decodes the payload received into a generic row and optionally returns
any metadata associated
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]