package edu.washington.escience.myria.operator.network; import edu.washington.escience.myria.operator.Operator; import edu.washington.escience.myria.operator.network.distribute.BroadcastDistributeFunction; import edu.washington.escience.myria.parallel.ExchangePairID; /** * The producer part of the Collect Exchange operator. The producer actively pushes the tuples generated by the child * operator to the paired CollectConsumer. */ public class CollectProducer extends GenericShuffleProducer { /** Required for Java serialization. */ private static final long serialVersionUID = 1L; /** * @param child the child who provides data for this producer to distribute. * @param operatorID destination operator the data goes * @param consumerWorkerID destination worker the data goes. */ public CollectProducer( final Operator child, final ExchangePairID operatorID, final int consumerWorkerID) { super( child, new ExchangePairID[] {operatorID}, new int[] {consumerWorkerID}, new BroadcastDistributeFunction()); this.distributeFunction.setDestinations(1, 1); } }