Class EventTimeExtension


  • @Experimental
    public class EventTimeExtension
    extends Object
    The entry point for the event-time extension, which provides the following functionality:
    • defines the event-time watermark and idle status watermark. If you use the EventTimeWatermarkGeneratorBuilder below, then you don't need to declare these watermarks manually in your application; otherwise you need to declare them in your own ProcessFunction.
    • provides the EventTimeWatermarkGeneratorBuilder to facilitate the generation of event time watermarks. An example of using EventTimeWatermarkGeneratorBuilder is as follows:
      
       OneInputStreamProcessFunction<POJO, POJO> watermarkGeneratorProcessFunction
             = EventTimeExtension
             .newWatermarkGeneratorBuilder(POJO::getEventTime)
             .periodicWatermark()
             .buildAsProcessFunction();
       source.process(watermarkGeneratorProcessFunction)
             .process(...)
       
    • provides a tool to encapsulate a user-defined EventTimeProcessFunction to provide the relevant components of the event-time extension.
      
       stream.process(
                EventTimeExtension.wrapProcessFunction(
                    new CustomEventTimeProcessFunction()
                )
             )
             .process(...)