Class TimeSmoother<T>

java.lang.Object
org.apache.flink.streaming.api.operators.AbstractStreamOperator<T>
de.robertmetzger.flink.utils.eventtime.TimeSmoother<T>
All Implemented Interfaces:
Serializable, org.apache.flink.api.common.state.CheckpointListener, org.apache.flink.streaming.api.operators.Input<T>, org.apache.flink.streaming.api.operators.KeyContext, org.apache.flink.streaming.api.operators.OneInputStreamOperator<T,​T>, org.apache.flink.streaming.api.operators.SetupableStreamOperator<T>, org.apache.flink.streaming.api.operators.StreamOperator<T>, org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator

public class TimeSmoother<T> extends org.apache.flink.streaming.api.operators.AbstractStreamOperator<T> implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<T,​T>
See Also:
Serialized Form
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

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

    chainingStrategy, config, latencyStats, LOG, metrics, output, processingTimeService
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> org.apache.flink.streaming.api.datastream.DataStream<T>
    forStream​(org.apache.flink.streaming.api.datastream.DataStream<T> stream)
     
    static <T> org.apache.flink.streaming.api.datastream.DataStream<T>
    forStream​(org.apache.flink.streaming.api.datastream.DataStream<T> stream, int sizeLimit)
    Create time smoother.
    void
     
    void
    processElement​(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<T> element)
     
    void
    processWatermark​(org.apache.flink.streaming.api.watermark.Watermark mark)
     

    Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator

    close, finish, getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getTimeServiceManager, getUserCodeClassloader, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, 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.api.common.state.CheckpointListener

    notifyCheckpointAborted, notifyCheckpointComplete

    Methods inherited from interface org.apache.flink.streaming.api.operators.Input

    processLatencyMarker, processWatermarkStatus

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

    getCurrentKey, setCurrentKey

    Methods inherited from interface org.apache.flink.streaming.api.operators.OneInputStreamOperator

    setKeyContextElement

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

    close, finish, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
  • Method Details

    • forStream

      public static <T> org.apache.flink.streaming.api.datastream.DataStream<T> forStream(org.apache.flink.streaming.api.datastream.DataStream<T> stream)
    • forStream

      public static <T> org.apache.flink.streaming.api.datastream.DataStream<T> forStream(org.apache.flink.streaming.api.datastream.DataStream<T> stream, int sizeLimit)
      Create time smoother.
      Parameters:
      sizeLimit - The maximum number of elements to keep in the buffer of the smoother
    • open

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

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

      public void processWatermark(org.apache.flink.streaming.api.watermark.Watermark mark) throws Exception
      Specified by:
      processWatermark in interface org.apache.flink.streaming.api.operators.Input<T>
      Overrides:
      processWatermark in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<T>
      Throws:
      Exception