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 specialChannelSelectorfor use in streaming programs.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intnumberOfChannels
-
Constructor Summary
Constructors Constructor Description StreamPartitioner()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StreamPartitioner<T>copy()voiddisableUnalignedCheckpoints()booleanequals(Object o)abstract SubtaskStateMappergetDownstreamSubtaskStateMapper()Defines the behavior of this partitioner, when downstream rescaled during recovery of in-flight data.SubtaskStateMappergetUpstreamSubtaskStateMapper()Defines the behavior of this partitioner, when upstream rescaled during recovery of in-flight data.inthashCode()booleanisBroadcast()Returns whether the channel selector always selects all the output channels.abstract booleanisPointwise()booleanisSupportsUnalignedCheckpoint()voidsetup(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, wait
-
Methods inherited from interface org.apache.flink.runtime.io.network.api.writer.ChannelSelector
selectChannel
-
-
-
-
Method Detail
-
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
public abstract StreamPartitioner<T> copy()
-
getUpstreamSubtaskStateMapper
public SubtaskStateMapper getUpstreamSubtaskStateMapper()
Defines the behavior of this partitioner, when upstream rescaled during recovery of in-flight data.
-
getDownstreamSubtaskStateMapper
public abstract SubtaskStateMapper 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()
-
-