Class BroadcastPartitioner<T>

  • Type Parameters:
    T - Type of the elements in the Stream being broadcast
    All Implemented Interfaces:
    Serializable, org.apache.flink.runtime.io.network.api.writer.ChannelSelector<org.apache.flink.runtime.plugable.SerializationDelegate<StreamRecord<T>>>

    @Internal
    public class BroadcastPartitioner<T>
    extends StreamPartitioner<T>
    Partitioner that selects all the output channels.
    See Also:
    Serialized Form
    • Constructor Detail

      • BroadcastPartitioner

        public BroadcastPartitioner()
    • Method Detail

      • selectChannel

        public int selectChannel​(org.apache.flink.runtime.plugable.SerializationDelegate<StreamRecord<T>> record)
        Note: Broadcast mode could be handled directly for all the output channels in record writer, so it is no need to select channels via this method.
      • getUpstreamSubtaskStateMapper

        public org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper getUpstreamSubtaskStateMapper()
        Description copied from class: StreamPartitioner
        Defines the behavior of this partitioner, when upstream rescaled during recovery of in-flight data.
        Overrides:
        getUpstreamSubtaskStateMapper in class StreamPartitioner<T>
      • getDownstreamSubtaskStateMapper

        public org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper getDownstreamSubtaskStateMapper()
        Description copied from class: StreamPartitioner
        Defines the behavior of this partitioner, when downstream rescaled during recovery of in-flight data.
        Specified by:
        getDownstreamSubtaskStateMapper in class StreamPartitioner<T>
      • isBroadcast

        public boolean isBroadcast()
        Specified by:
        isBroadcast in interface org.apache.flink.runtime.io.network.api.writer.ChannelSelector<T>
        Overrides:
        isBroadcast in class StreamPartitioner<T>