Class EventTimeOrderingOperator<K,​T>

  • Type Parameters:
    K - Type of the keys
    T - The input type of the operator
    All Implemented Interfaces:
    java.io.Serializable, org.apache.flink.api.java.typeutils.InputTypeConfigurable, org.apache.flink.runtime.state.CheckpointListener, org.apache.flink.streaming.api.operators.KeyContext, org.apache.flink.streaming.api.operators.OneInputStreamOperator<T,​T>, org.apache.flink.streaming.api.operators.StreamOperator<T>, org.apache.flink.streaming.api.operators.Triggerable<K,​org.apache.flink.runtime.state.VoidNamespace>, org.apache.flink.util.Disposable

    public class EventTimeOrderingOperator<K,​T>
    extends org.apache.flink.streaming.api.operators.AbstractStreamOperator<T>
    implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<T,​T>, org.apache.flink.streaming.api.operators.Triggerable<K,​org.apache.flink.runtime.state.VoidNamespace>, org.apache.flink.api.java.typeutils.InputTypeConfigurable
    Orders elements into event time order using the watermark and managed state to buffer elements.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator

        org.apache.flink.streaming.api.operators.AbstractStreamOperator.CountingOutput<OUT extends java.lang.Object>
    • Field Summary

      • Fields inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator

        chainingStrategy, config, latencyStats, LOG, metrics, output, timeServiceManager
    • Constructor Summary

      Constructors 
      Constructor Description
      EventTimeOrderingOperator()
      Creates an event time-based reordering operator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void initializeState​(org.apache.flink.runtime.state.StateInitializationContext context)  
      void onEventTime​(org.apache.flink.streaming.api.operators.InternalTimer<K,​org.apache.flink.runtime.state.VoidNamespace> timer)
      Occurs when an event-time timer fires due to watermark progression.
      void onProcessingTime​(org.apache.flink.streaming.api.operators.InternalTimer<K,​org.apache.flink.runtime.state.VoidNamespace> timer)  
      void open()  
      void processElement​(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<T> element)  
      void processWatermark​(org.apache.flink.streaming.api.watermark.Watermark mark)  
      void setInputType​(org.apache.flink.api.common.typeinfo.TypeInformation<?> type, org.apache.flink.api.common.ExecutionConfig executionConfig)  
      • Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator

        close, dispose, getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getUserCodeClassloader, initializeState, notifyCheckpointComplete, numEventTimeTimers, numProcessingTimeTimers, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setup, snapshotState, snapshotState
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.flink.runtime.state.CheckpointListener

        notifyCheckpointComplete
      • Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContext

        getCurrentKey, setCurrentKey
      • Methods inherited from interface org.apache.flink.streaming.api.operators.OneInputStreamOperator

        processLatencyMarker
      • Methods inherited from interface org.apache.flink.streaming.api.operators.StreamOperator

        close, dispose, getChainingStrategy, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setup, snapshotState
    • Constructor Detail

      • EventTimeOrderingOperator

        public EventTimeOrderingOperator()
        Creates an event time-based reordering operator.
    • Method Detail

      • setInputType

        public void setInputType​(org.apache.flink.api.common.typeinfo.TypeInformation<?> type,
                                 org.apache.flink.api.common.ExecutionConfig executionConfig)
        Specified by:
        setInputType in interface org.apache.flink.api.java.typeutils.InputTypeConfigurable
      • initializeState

        public void initializeState​(org.apache.flink.runtime.state.StateInitializationContext context)
                             throws java.lang.Exception
        Overrides:
        initializeState in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<T>
        Throws:
        java.lang.Exception
      • open

        public void open()
                  throws java.lang.Exception
        Specified by:
        open in interface org.apache.flink.streaming.api.operators.StreamOperator<K>
        Overrides:
        open in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<T>
        Throws:
        java.lang.Exception
      • processElement

        public void processElement​(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<T> element)
                            throws java.lang.Exception
        Specified by:
        processElement in interface org.apache.flink.streaming.api.operators.OneInputStreamOperator<K,​T>
        Throws:
        java.lang.Exception
      • processWatermark

        public void processWatermark​(org.apache.flink.streaming.api.watermark.Watermark mark)
                              throws java.lang.Exception
        Specified by:
        processWatermark in interface org.apache.flink.streaming.api.operators.OneInputStreamOperator<K,​T>
        Overrides:
        processWatermark in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<T>
        Throws:
        java.lang.Exception
      • onEventTime

        public void onEventTime​(org.apache.flink.streaming.api.operators.InternalTimer<K,​org.apache.flink.runtime.state.VoidNamespace> timer)
                         throws java.lang.Exception
        Occurs when an event-time timer fires due to watermark progression.
        Specified by:
        onEventTime in interface org.apache.flink.streaming.api.operators.Triggerable<K,​T>
        Parameters:
        timer - the timer details.
        Throws:
        java.lang.Exception
      • onProcessingTime

        public void onProcessingTime​(org.apache.flink.streaming.api.operators.InternalTimer<K,​org.apache.flink.runtime.state.VoidNamespace> timer)
                              throws java.lang.Exception
        Specified by:
        onProcessingTime in interface org.apache.flink.streaming.api.operators.Triggerable<K,​T>
        Throws:
        java.lang.Exception