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:
BinaryHashPartitioner
,BroadcastPartitioner
,CustomPartitionerWrapper
,ForwardPartitioner
,GlobalPartitioner
,KeyGroupStreamPartitioner
,RebalancePartitioner
,RescalePartitioner
,ShufflePartitioner
@Internal public abstract class StreamPartitioner<T> extends Object implements ChannelSelector<SerializationDelegate<StreamRecord<T>>>, Serializable
A specialChannelSelector
for use in streaming programs.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
numberOfChannels
-
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()
void
disableUnalignedCheckpoints()
boolean
equals(Object o)
abstract SubtaskStateMapper
getDownstreamSubtaskStateMapper()
Defines the behavior of this partitioner, when downstream rescaled during recovery of in-flight data.SubtaskStateMapper
getUpstreamSubtaskStateMapper()
Defines the behavior of this partitioner, when upstream rescaled during recovery of in-flight data.int
hashCode()
boolean
isBroadcast()
Returns whether the channel selector always selects all the output channels.abstract boolean
isPointwise()
boolean
isSupportsUnalignedCheckpoint()
void
setup(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:ChannelSelector
Initializes the channel selector with the number of output channels.- Specified by:
setup
in 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:ChannelSelector
Returns whether the channel selector always selects all the output channels.- Specified by:
isBroadcast
in 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()
-
-