Interface Exchange

All Superinterfaces:
GraphValue<PhysicalOperator>, Iterable<PhysicalOperator>, PhysicalOperator
All Known Implementing Classes:
AbstractDeMuxExchange, AbstractExchange, AbstractMuxExchange, BroadcastExchange, HashToMergeExchange, HashToRandomExchange, OrderedMuxExchange, OrderedPartitionExchange, RangePartitionExchange, SingleMergeExchange, UnionExchange, UnorderedDeMuxExchange, UnorderedMuxExchange

public interface Exchange extends PhysicalOperator
  • Method Details

    • setupSenders

      void setupSenders(int majorFragmentId, List<CoordinationProtos.DrillbitEndpoint> senderLocations) throws PhysicalOperatorSetupException
      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

      void setupReceivers(int majorFragmentId, List<CoordinationProtos.DrillbitEndpoint> receiverLocations) throws PhysicalOperatorSetupException
      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

      Sender getSender(int minorFragmentId, PhysicalOperator child) throws PhysicalOperatorSetupException
      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

      ParallelizationInfo getSenderParallelizationInfo(List<CoordinationProtos.DrillbitEndpoint> receiverFragmentEndpoints)
      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

      ParallelizationInfo getReceiverParallelizationInfo(List<CoordinationProtos.DrillbitEndpoint> senderFragmentEndpoints)
      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

      PhysicalOperator getChild()
      Return the feeding child of this operator node.
      Returns:
      The feeding child of this operator node.
    • getParallelizationDependency

      Exchange.ParallelizationDependency getParallelizationDependency()
      Get the parallelization dependency of the Exchange.