Flink Watermark是用于处理数据乱序问题,网上已经有很多优秀的文章介绍,这里就不重复了。参考:
https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/event_timestamps_watermarks.html
今天要说的使用Watermark过程中自己挖的坑,使用sideOutputLateData()过程中没有正常输出的问题,在此记录一下:
先来看一下源码解析:
/**
* Send late arriving data to the side output identified by the given {@link OutputTag}. Data
* is considered late after the watermark has passed the end of the window plus the allowed
* lateness set using {@link #allowedLateness(Time)}.
*
* <p>You can get the stream of late data using
* {@link SingleOutputStreamOperator#getSideOutput(OutputTag)} on the
* {@link SingleOutputStreamOperator} resulting from the windowed operation
* with the same {@link OutputTag}.
*/
@Public