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 Details

    • numberOfChannels

      protected int numberOfChannels
  • Constructor Details

    • StreamPartitioner

      public StreamPartitioner()
  • Method Details

    • 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 interface ChannelSelector<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 interface ChannelSelector<T>
      Returns:
      true if the selector is for broadcast mode.
    • copy

      public abstract StreamPartitioner<T> copy()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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()