public class RecordOutputEmitter extends Object implements ChannelSelector<org.apache.flink.types.Record>
| Constructor and Description |
|---|
RecordOutputEmitter(ShipStrategyType strategy)
Creates a new channel selector that uses the given strategy (broadcasting, partitioning, ...).
|
RecordOutputEmitter(ShipStrategyType strategy,
org.apache.flink.api.common.typeutils.TypeComparator<org.apache.flink.types.Record> 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.
|
RecordOutputEmitter(ShipStrategyType strategy,
org.apache.flink.api.common.typeutils.TypeComparator<org.apache.flink.types.Record> comparator,
org.apache.flink.api.common.distributions.DataDistribution distr)
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.
|
RecordOutputEmitter(ShipStrategyType strategy,
org.apache.flink.api.common.typeutils.TypeComparator<org.apache.flink.types.Record> comparator,
org.apache.flink.api.common.functions.Partitioner<?> partitioner) |
RecordOutputEmitter(ShipStrategyType strategy,
org.apache.flink.api.common.typeutils.TypeComparator<org.apache.flink.types.Record> comparator,
org.apache.flink.api.common.functions.Partitioner<?> partitioner,
org.apache.flink.api.common.distributions.DataDistribution distr) |
| Modifier and Type | Method and Description |
|---|---|
int[] |
selectChannels(org.apache.flink.types.Record record,
int numberOfChannels)
Returns the logical channel indexes, to which the given record should be
written.
|
public RecordOutputEmitter(ShipStrategyType strategy)
strategy - The distribution strategy to be used.public RecordOutputEmitter(ShipStrategyType strategy, org.apache.flink.api.common.typeutils.TypeComparator<org.apache.flink.types.Record> comparator)
strategy - The distribution strategy to be used.comparator - The comparator used to hash / compare the records.public RecordOutputEmitter(ShipStrategyType strategy, org.apache.flink.api.common.typeutils.TypeComparator<org.apache.flink.types.Record> comparator, org.apache.flink.api.common.distributions.DataDistribution distr)
strategy - The distribution strategy to be used.comparator - The comparator used to hash / compare the records.distr - The distribution pattern used in the case of a range partitioning.public RecordOutputEmitter(ShipStrategyType strategy, org.apache.flink.api.common.typeutils.TypeComparator<org.apache.flink.types.Record> comparator, org.apache.flink.api.common.functions.Partitioner<?> partitioner)
public RecordOutputEmitter(ShipStrategyType strategy, org.apache.flink.api.common.typeutils.TypeComparator<org.apache.flink.types.Record> comparator, org.apache.flink.api.common.functions.Partitioner<?> partitioner, org.apache.flink.api.common.distributions.DataDistribution distr)
public final int[] selectChannels(org.apache.flink.types.Record record,
int numberOfChannels)
ChannelSelectorselectChannels in interface ChannelSelector<org.apache.flink.types.Record>record - the record to the determine the output channels fornumberOfChannels - the total number of output channels which are attached to respective output gateCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.