T - The type of the element handled by the emitter.public class OutputEmitter<T> extends Object implements ChannelSelector<SerializationDelegate<T>>
| 构造器和说明 |
|---|
OutputEmitter(ShipStrategyType strategy,
int indexInSubtaskGroup)
Creates a new channel selector that uses the given strategy (broadcasting, partitioning, ...)
|
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, ...)
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
isBroadcast()
Returns whether the channel selector always selects all the output channels.
|
int |
selectChannel(SerializationDelegate<T> record)
Returns the logical channel index, to which the given record should be written.
|
void |
setup(int numberOfChannels)
Initializes the channel selector with the number of output channels.
|
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 void setup(int numberOfChannels)
ChannelSelectorsetup 在接口中 ChannelSelector<SerializationDelegate<T>>numberOfChannels - the total number of output channels which are attached to respective
output gate.public final int selectChannel(SerializationDelegate<T> record)
ChannelSelectorUnsupportedOperationException).selectChannel 在接口中 ChannelSelector<SerializationDelegate<T>>record - the record to determine the output channels for.public boolean isBroadcast()
ChannelSelectorisBroadcast 在接口中 ChannelSelector<SerializationDelegate<T>>Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.