You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "walterddr (via GitHub)" <gi...@apache.org> on 2023/06/27 20:41:06 UTC

[GitHub] [pinot] walterddr commented on a diff in pull request #10983: Message batch ingestion lag fix

walterddr commented on code in PR #10983:
URL: https://github.com/apache/pinot/pull/10983#discussion_r1244326440


##########
pinot-spi/src/test/java/org/apache/pinot/spi/stream/StreamDataDecoderImplTest.java:
##########
@@ -41,7 +41,7 @@ public void testDecodeValueOnly()
     messageDecoder.init(Collections.emptyMap(), ImmutableSet.of(NAME_FIELD), "");
     String value = "Alice";
     StreamMessage<byte[]> message = new StreamMessage(value.getBytes(StandardCharsets.UTF_8),
-        value.getBytes(StandardCharsets.UTF_8).length);
+        value.getBytes(StandardCharsets.UTF_8).length, null);

Review Comment:
   can we add a test with non-null metadata?



##########
pinot-spi/src/main/java/org/apache/pinot/spi/stream/StreamMessage.java:
##########
@@ -51,8 +51,8 @@ public StreamMessage(@Nullable byte[] key, T value, @Nullable StreamMessageMetad
     _length = length;
   }
 
-  public StreamMessage(T value, int length) {
-    this(null, value, null, length);
+  public StreamMessage(T value, int length, @Nullable StreamMessageMetadata metadata) {
+    this(null, value, metadata, length);

Review Comment:
   let's keep original and add a nullable constructor?
   ```suggestion
     public StreamMessage(T value, int length) {
       this(value, length, null);
     }
     
     public StreamMessage(T value, int length, @Nullable StreamMessageMetadata metadata) {
       this(null, value, metadata, length);
   ```



-- 
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-unsubscribe@pinot.apache.org

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


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