Class SortingDataInput<T,​K>

  • Type Parameters:
    T - The type of the value in incoming StreamRecords.
    K - The type of the key.
    All Implemented Interfaces:
    Closeable, AutoCloseable, org.apache.flink.runtime.io.AvailabilityProvider, PushingAsyncDataInput<T>, StreamTaskInput<T>

    public final class SortingDataInput<T,​K>
    extends Object
    implements StreamTaskInput<T>
    A StreamTaskInput which sorts in the incoming records from a chained input. It postpones emitting the records until it receives DataInputStatus.END_OF_INPUT from the chained input. After it is done it emits a single record at a time from the sorter.

    The sorter uses binary comparison of keys, which are extracted and serialized when received from the chained input. Moreover the timestamps of incoming records are used for secondary ordering. For the comparison it uses either FixedLengthByteKeyComparator if the length of the serialized key is constant, or VariableLengthByteKeyComparator otherwise.

    Watermarks, watermark statuses, nor latency markers are propagated downstream as they do not make sense with buffered records. The input emits the largest watermark seen after all records.

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.flink.runtime.io.AvailabilityProvider

        org.apache.flink.runtime.io.AvailabilityProvider.AvailabilityHelper
    • Field Summary

      • Fields inherited from interface org.apache.flink.runtime.io.AvailabilityProvider

        AVAILABLE
    • Constructor Summary

      Constructors 
      Constructor Description
      SortingDataInput​(StreamTaskInput<T> wrappedInput, org.apache.flink.api.common.typeutils.TypeSerializer<T> typeSerializer, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.java.functions.KeySelector<T,​K> keySelector, org.apache.flink.runtime.memory.MemoryManager memoryManager, org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager, boolean objectReuse, double managedMemoryFraction, org.apache.flink.configuration.Configuration taskManagerConfiguration, org.apache.flink.runtime.jobgraph.tasks.TaskInvokable containingTask, org.apache.flink.api.common.ExecutionConfig executionConfig)  
    • Constructor Detail

      • SortingDataInput

        public SortingDataInput​(StreamTaskInput<T> wrappedInput,
                                org.apache.flink.api.common.typeutils.TypeSerializer<T> typeSerializer,
                                org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
                                org.apache.flink.api.java.functions.KeySelector<T,​K> keySelector,
                                org.apache.flink.runtime.memory.MemoryManager memoryManager,
                                org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
                                boolean objectReuse,
                                double managedMemoryFraction,
                                org.apache.flink.configuration.Configuration taskManagerConfiguration,
                                org.apache.flink.runtime.jobgraph.tasks.TaskInvokable containingTask,
                                org.apache.flink.api.common.ExecutionConfig executionConfig)