- All Superinterfaces:
GraphValue<PhysicalOperator>
, Iterable<PhysicalOperator>
, PhysicalOperator
- All Known Implementing Classes:
AbstractDeMuxExchange
, AbstractExchange
, AbstractMuxExchange
, BroadcastExchange
, HashToMergeExchange
, HashToRandomExchange
, OrderedMuxExchange
, OrderedPartitionExchange
, RangePartitionExchange
, SingleMergeExchange
, UnionExchange
, UnorderedDeMuxExchange
, UnorderedMuxExchange
-
Nested Class Summary
Nested Classes
static enum
Exchanges are fragment boundaries in physical operator tree.
-
Method Summary
Return the feeding child of this operator node.
Get the parallelization dependency of the Exchange.
Get the Receiver associated with the given minorFragmentId.
long
Returns the memory requirement for the receiver side of the exchange operator.
Provide parallelization parameters for receiver side of the exchange.
Get the Sender associated with the given minorFragmentId.
long
Returns the memory requirement for the sender side of the exchange operator.
Provide parallelization parameters for sender side of the exchange.
void
Inform this Exchange node about its receiver locations.
void
Inform this Exchange node about its sender locations.
Methods inherited from interface org.apache.drill.common.graph.GraphValue
accept
Methods inherited from interface org.apache.drill.exec.physical.base.PhysicalOperator
accept, getCost, getInitialAllocation, getMaxAllocation, getNewWithChildren, getOperatorId, getOperatorType, getSVMode, getUserName, isBufferedOperator, isExecutable, setCost, setMaxAllocation, setOperatorId
-
Method Details
-
setupSenders
Inform this Exchange node about its sender locations. This list should be index-ordered the same as the expected
minorFragmentIds for each sender.
- Parameters:
senderLocations
-
- Throws:
PhysicalOperatorSetupException
-
setupReceivers
Inform this Exchange node about its receiver locations. This list should be index-ordered the same as the expected
minorFragmentIds for each receiver.
- Parameters:
receiverLocations
-
- Throws:
PhysicalOperatorSetupException
-
getSender
Get the Sender associated with the given minorFragmentId. Cannot be called until after setupSenders() and
setupReceivers() have been called.
- Parameters:
minorFragmentId
- The minor fragment id, must be in the range [0, fragment.width).
child
- The feeding node for the requested sender.
- Returns:
- The materialized sender for the given arguments.
- Throws:
PhysicalOperatorSetupException
-
getReceiver
Receiver getReceiver(int minorFragmentId)
Get the Receiver associated with the given minorFragmentId. Cannot be called until after setupSenders() and
setupReceivers() have been called.
- Parameters:
minorFragmentId
- The minor fragment id, must be in the range [0, fragment.width).
- Returns:
- The materialized recevier for the given arguments.
-
getSenderMemory
long getSenderMemory(int receiverCount,
int senderCount)
Returns the memory requirement for the sender side of the exchange operator.
- Parameters:
receiverCount
- number of receivers at the receiving end of this exchange operator.
senderCount
- number of senders sending the rows for this exchange operator.
- Returns:
- Total memory required by this operator.
-
getReceiverMemory
long getReceiverMemory(int receiverCount,
int senderCount)
Returns the memory requirement for the receiver side of the exchange operator.
- Parameters:
receiverCount
- number of receivers receiving the rows sent by the sender side of this
exchange operator.
senderCount
- number of senders sending the rows.
- Returns:
- Total memory required by this operator.
-
getSenderParallelizationInfo
Provide parallelization parameters for sender side of the exchange. Output includes min width,
max width and affinity to Drillbits.
- Parameters:
receiverFragmentEndpoints
- Endpoints assigned to receiver fragment if available, otherwise an empty list.
- Returns:
- Sender
ParallelizationInfo
.
-
getReceiverParallelizationInfo
Provide parallelization parameters for receiver side of the exchange. Output includes min width,
max width and affinity to Drillbits.
- Parameters:
senderFragmentEndpoints
- Endpoints assigned to receiver fragment if available, otherwise an empty list
- Returns:
- Receiver
ParallelizationInfo
.
-
getChild
Return the feeding child of this operator node.
- Returns:
- The feeding child of this operator node.
-
getParallelizationDependency
Get the parallelization dependency of the Exchange.