walterddr commented on code in PR #9887:
URL: https://github.com/apache/pinot/pull/9887#discussion_r1041155932
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/InMemoryMailboxService.java:
##########
@@ -22,22 +22,25 @@
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.function.Consumer;
import org.apache.pinot.query.runtime.blocks.TransferableBlock;
public class InMemoryMailboxService implements
MailboxService<TransferableBlock> {
// channel manager
private final String _hostname;
private final int _mailboxPort;
+ private final Consumer<MailboxIdentifier> _gotMailCallback;
static final int DEFAULT_CHANNEL_CAPACITY = 5;
// TODO: This should come from a config and should be consistent with the
timeout for GrpcMailboxService
static final int DEFAULT_CHANNEL_TIMEOUT_SECONDS = 1;
private final ConcurrentHashMap<String, InMemoryMailboxState>
_mailboxStateMap = new ConcurrentHashMap<>();
- public InMemoryMailboxService(String hostname, int mailboxPort) {
+ public InMemoryMailboxService(String hostname, int mailboxPort,
Consumer<MailboxIdentifier> gotMailCallback) {
_hostname = hostname;
_mailboxPort = mailboxPort;
+ _gotMailCallback = gotMailCallback;
Review Comment:
precisely why i think it can be done this way, see comment:
https://github.com/apache/pinot/pull/9887/files#r1041149192
--
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]