T - The type of the element handled by the emitter.public class OutputEmitter<T> extends Object implements ChannelSelector<SerializationDelegate<T>>
| Constructor and Description |
|---|
OutputEmitter(ShipStrategyType strategy,
int indexInSubtaskGroup)
Creates a new channel selector that uses the given strategy (broadcasting, partitioning, ...)
and uses the supplied task index perform a round robin distribution.
|
OutputEmitter(ShipStrategyType strategy,
int indexInSubtaskGroup,
org.apache.flink.api.common.typeutils.TypeComparator<T> comparator,
org.apache.flink.api.common.functions.Partitioner<?> partitioner,
org.apache.flink.api.common.distributions.DataDistribution distribution) |
OutputEmitter(ShipStrategyType strategy,
org.apache.flink.api.common.typeutils.TypeComparator<T> comparator)
Creates a new channel selector that uses the given strategy (broadcasting, partitioning, ...)
and uses the supplied comparator to hash / compare records for partitioning them deterministically.
|
| Modifier and Type | Method and Description |
|---|---|
int[] |
selectChannels(SerializationDelegate<T> record,
int numberOfChannels)
Returns the logical channel indexes, to which the given record should be
written.
|
public OutputEmitter(ShipStrategyType strategy, int indexInSubtaskGroup)
strategy - The distribution strategy to be used.public OutputEmitter(ShipStrategyType strategy, org.apache.flink.api.common.typeutils.TypeComparator<T> comparator)
strategy - The distribution strategy to be used.comparator - The comparator used to hash / compare the records.public OutputEmitter(ShipStrategyType strategy, int indexInSubtaskGroup, org.apache.flink.api.common.typeutils.TypeComparator<T> comparator, org.apache.flink.api.common.functions.Partitioner<?> partitioner, org.apache.flink.api.common.distributions.DataDistribution distribution)
public final int[] selectChannels(SerializationDelegate<T> record, int numberOfChannels)
ChannelSelectorselectChannels in interface ChannelSelector<SerializationDelegate<T>>record - the record to the determine the output channels fornumberOfChannels - the total number of output channels which are attached to respective output gateCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.