Class EventTimeWrappedTwoOutputStreamProcessFunction<IN,OUT1,OUT2>

java.lang.Object
org.apache.flink.datastream.impl.extension.eventtime.functions.EventTimeWrappedTwoOutputStreamProcessFunction<IN,OUT1,OUT2>
All Implemented Interfaces:
Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.datastream.api.function.ProcessFunction, org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT1,OUT2>

public class EventTimeWrappedTwoOutputStreamProcessFunction<IN,OUT1,OUT2> extends Object implements org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT1,OUT2>
The wrapped TwoOutputEventTimeStreamProcessFunction that take care of event-time alignment with idleness.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    EventTimeWrappedTwoOutputStreamProcessFunction(org.apache.flink.datastream.api.extension.eventtime.function.TwoOutputEventTimeStreamProcessFunction<IN,OUT1,OUT2> wrappedUserFunction)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    Set<? extends org.apache.flink.api.common.watermark.WatermarkDeclaration>
     
    void
    endInput(org.apache.flink.datastream.api.context.TwoOutputNonPartitionedContext<OUT1,OUT2> ctx)
     
    org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT1,OUT2>
     
    void
    initEventTimeExtension(org.apache.flink.streaming.api.operators.InternalTimerService<org.apache.flink.runtime.state.VoidNamespace> timerService, Supplier<Long> eventTimeSupplier, org.apache.flink.streaming.runtime.watermark.extension.eventtime.EventTimeWatermarkHandler eventTimeWatermarkHandler)
    Initialize the event time extension, note that this method should be invoked before open method.
    void
    onEventTime(long timestamp, org.apache.flink.datastream.api.common.Collector<OUT1> output1, org.apache.flink.datastream.api.common.Collector<OUT2> output2, org.apache.flink.datastream.api.context.TwoOutputPartitionedContext<OUT1,OUT2> ctx)
     
    void
    onProcessingTimer(long timestamp, org.apache.flink.datastream.api.common.Collector<OUT1> output1, org.apache.flink.datastream.api.common.Collector<OUT2> output2, org.apache.flink.datastream.api.context.TwoOutputPartitionedContext<OUT1,OUT2> ctx)
     
    org.apache.flink.api.common.watermark.WatermarkHandlingResult
    onWatermark(org.apache.flink.api.common.watermark.Watermark watermark, org.apache.flink.datastream.api.common.Collector<OUT1> output1, org.apache.flink.datastream.api.common.Collector<OUT2> output2, org.apache.flink.datastream.api.context.TwoOutputNonPartitionedContext<OUT1,OUT2> ctx)
     
    void
    open(org.apache.flink.datastream.api.context.TwoOutputNonPartitionedContext<OUT1,OUT2> ctx)
     
    void
    processRecord(IN record, org.apache.flink.datastream.api.common.Collector<OUT1> output1, org.apache.flink.datastream.api.common.Collector<OUT2> output2, org.apache.flink.datastream.api.context.TwoOutputPartitionedContext<OUT1,OUT2> ctx)
     
    Set<org.apache.flink.api.common.state.StateDeclaration>
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EventTimeWrappedTwoOutputStreamProcessFunction

      public EventTimeWrappedTwoOutputStreamProcessFunction(org.apache.flink.datastream.api.extension.eventtime.function.TwoOutputEventTimeStreamProcessFunction<IN,OUT1,OUT2> wrappedUserFunction)
  • Method Details

    • open

      public void open(org.apache.flink.datastream.api.context.TwoOutputNonPartitionedContext<OUT1,OUT2> ctx) throws Exception
      Specified by:
      open in interface org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT1,OUT2>
      Throws:
      Exception
    • initEventTimeExtension

      public void initEventTimeExtension(@Nullable org.apache.flink.streaming.api.operators.InternalTimerService<org.apache.flink.runtime.state.VoidNamespace> timerService, Supplier<Long> eventTimeSupplier, org.apache.flink.streaming.runtime.watermark.extension.eventtime.EventTimeWatermarkHandler eventTimeWatermarkHandler)
      Initialize the event time extension, note that this method should be invoked before open method.
    • processRecord

      public void processRecord(IN record, org.apache.flink.datastream.api.common.Collector<OUT1> output1, org.apache.flink.datastream.api.common.Collector<OUT2> output2, org.apache.flink.datastream.api.context.TwoOutputPartitionedContext<OUT1,OUT2> ctx) throws Exception
      Specified by:
      processRecord in interface org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT1,OUT2>
      Throws:
      Exception
    • endInput

      public void endInput(org.apache.flink.datastream.api.context.TwoOutputNonPartitionedContext<OUT1,OUT2> ctx) throws Exception
      Specified by:
      endInput in interface org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT1,OUT2>
      Throws:
      Exception
    • onProcessingTimer

      public void onProcessingTimer(long timestamp, org.apache.flink.datastream.api.common.Collector<OUT1> output1, org.apache.flink.datastream.api.common.Collector<OUT2> output2, org.apache.flink.datastream.api.context.TwoOutputPartitionedContext<OUT1,OUT2> ctx) throws Exception
      Specified by:
      onProcessingTimer in interface org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT1,OUT2>
      Throws:
      Exception
    • onWatermark

      public org.apache.flink.api.common.watermark.WatermarkHandlingResult onWatermark(org.apache.flink.api.common.watermark.Watermark watermark, org.apache.flink.datastream.api.common.Collector<OUT1> output1, org.apache.flink.datastream.api.common.Collector<OUT2> output2, org.apache.flink.datastream.api.context.TwoOutputNonPartitionedContext<OUT1,OUT2> ctx) throws Exception
      Specified by:
      onWatermark in interface org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT1,OUT2>
      Throws:
      Exception
    • onEventTime

      public void onEventTime(long timestamp, org.apache.flink.datastream.api.common.Collector<OUT1> output1, org.apache.flink.datastream.api.common.Collector<OUT2> output2, org.apache.flink.datastream.api.context.TwoOutputPartitionedContext<OUT1,OUT2> ctx) throws Exception
      Throws:
      Exception
    • usesStates

      public Set<org.apache.flink.api.common.state.StateDeclaration> usesStates()
      Specified by:
      usesStates in interface org.apache.flink.datastream.api.function.ProcessFunction
    • declareWatermarks

      public Set<? extends org.apache.flink.api.common.watermark.WatermarkDeclaration> declareWatermarks()
      Specified by:
      declareWatermarks in interface org.apache.flink.datastream.api.function.ProcessFunction
    • close

      public void close() throws Exception
      Specified by:
      close in interface org.apache.flink.datastream.api.function.ProcessFunction
      Throws:
      Exception
    • getWrappedUserFunction

      public org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,OUT1,OUT2> getWrappedUserFunction()