aboutsummaryrefslogtreecommitdiff
path: root/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/Exchange.java
diff options
context:
space:
mode:
Diffstat (limited to 'exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/Exchange.java')
-rw-r--r--exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/Exchange.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/Exchange.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/Exchange.java
index 56e9b9c90..7de915c4c 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/Exchange.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/Exchange.java
@@ -79,6 +79,23 @@ public interface Exchange extends PhysicalOperator {
Receiver getReceiver(int minorFragmentId);
/**
+ * Returns the memory requirement for the sender side of the exchange operator.
+ * @param receiverCount number of receivers at the receiving end of this exchange operator.
+ * @param senderCount number of senders sending the rows for this exchange operator.
+ * @return Total memory required by this operator.
+ */
+ long getSenderMemory(int receiverCount, int senderCount);
+
+ /**
+ * Returns the memory requirement for the receiver side of the exchange operator.
+ * @param receiverCount number of receivers receiving the rows sent by the sender side of this
+ * exchange operator.
+ * @param senderCount number of senders sending the rows.
+ * @return Total memory required by this operator.
+ */
+ long getReceiverMemory(int receiverCount, int senderCount);
+
+ /**
* Provide parallelization parameters for sender side of the exchange. Output includes min width,
* max width and affinity to Drillbits.
*