gortiz commented on code in PR #15694:
URL: https://github.com/apache/pinot/pull/15694#discussion_r2073158585
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/GrpcSendingMailbox.java:
##########
@@ -319,4 +279,78 @@ static List<ByteString> toByteStrings(List<ByteBuffer>
bytes, int maxByteStringS
return result;
}
+
+ private static abstract class Sender {
+ protected abstract void send(MseBlock block, List<DataBuffer>
serializedStats)
+ throws IOException;
+ }
+
+ private static class SplitSender extends Sender {
+ private final GrpcSendingMailbox _mailbox;
+
+ public SplitSender(GrpcSendingMailbox mailbox) {
+ _mailbox = mailbox;
+ }
+
+ @Override
+ protected void send(MseBlock block, List<DataBuffer> serializedStats)
+ throws IOException {
+ _mailbox._statMap.merge(MailboxSendOperator.StatKey.RAW_MESSAGES, 1);
Review Comment:
Why don't you move this whole method to `GrpcSendingMailbox`? Then each
Sender would be just `processAndSend` .
--
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]