Class 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:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      Set<? extends org.apache.flink.api.common.watermark.WatermarkDeclaration> declareWatermarks()  
      void endInput​(org.apache.flink.datastream.api.context.TwoOutputNonPartitionedContext<OUT1,​OUT2> ctx)  
      org.apache.flink.datastream.api.function.TwoOutputStreamProcessFunction<IN,​OUT1,​OUT2> getWrappedUserFunction()  
      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> usesStates()  
    • Constructor Detail

      • EventTimeWrappedTwoOutputStreamProcessFunction

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

      • 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()