Class StreamPartitioner<T>
java.lang.Object
org.apache.flink.streaming.runtime.partitioner.StreamPartitioner<T>
- All Implemented Interfaces:
Serializable,ChannelSelector<SerializationDelegate<StreamRecord<T>>>
- Direct Known Subclasses:
BroadcastPartitioner,CustomPartitionerWrapper,ForwardPartitioner,GlobalPartitioner,KeyGroupStreamPartitioner,RebalancePartitioner,RescalePartitioner,ShufflePartitioner
@Internal
public abstract class StreamPartitioner<T>
extends Object
implements ChannelSelector<SerializationDelegate<StreamRecord<T>>>, Serializable
A special
ChannelSelector for use in streaming programs.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StreamPartitioner<T>copy()voidbooleanabstract SubtaskStateMapperDefines the behavior of this partitioner, when downstream rescaled during recovery of in-flight data.Defines the behavior of this partitioner, when upstream rescaled during recovery of in-flight data.inthashCode()booleanReturns whether the channel selector always selects all the output channels.abstract booleanbooleanvoidsetup(int numberOfChannels) Initializes the channel selector with the number of output channels.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.runtime.io.network.api.writer.ChannelSelector
selectChannel
-
Field Details
-
numberOfChannels
protected int numberOfChannels
-
-
Constructor Details
-
StreamPartitioner
public StreamPartitioner()
-
-
Method Details
-
setup
public void setup(int numberOfChannels) Description copied from interface:ChannelSelectorInitializes the channel selector with the number of output channels.- Specified by:
setupin interfaceChannelSelector<T>- Parameters:
numberOfChannels- the total number of output channels which are attached to respective output gate.
-
isBroadcast
public boolean isBroadcast()Description copied from interface:ChannelSelectorReturns whether the channel selector always selects all the output channels.- Specified by:
isBroadcastin interfaceChannelSelector<T>- Returns:
- true if the selector is for broadcast mode.
-
copy
-
equals
-
hashCode
public int hashCode() -
getUpstreamSubtaskStateMapper
Defines the behavior of this partitioner, when upstream rescaled during recovery of in-flight data. -
getDownstreamSubtaskStateMapper
Defines the behavior of this partitioner, when downstream rescaled during recovery of in-flight data. -
isPointwise
public abstract boolean isPointwise() -
isSupportsUnalignedCheckpoint
public boolean isSupportsUnalignedCheckpoint() -
disableUnalignedCheckpoints
public void disableUnalignedCheckpoints()
-