描述比较乱,看不懂。 [email protected] <[email protected]> 于2020年12月17日周四 下午2:16写道:
> Hi, > 我们现在以eventTime作为时间标准,每3秒做一次TumbleWindow,数据假设如下 > 系统时间 > 与上一条间隔 > 事件时间 > 与上一条间隔 > 9:00:01 > > 9:00:01 > > 9:00:11 > 10s > 9:00:02 > 1s > 9:00:12 > 1s > 9:00:12 > 10s > 从事件时间上看,第一条和第二条数据是归集到同一窗口的。 > 不过现在的处理需要在窗口有第一条数据后系统时间超时4s以上就强制关闭该窗口,即在系统时间9:00:05时关闭窗口,忽略掉第二条数据。 > 请问这种情况需要怎么生成watermark? > 使用过 > WatermarkStrategy.forBoundedOutOfOrderness(Duration.ofSeconds(4L)) > 或者 > > WatermarkStrategy.forMonotonousTimestamps().withIdleness(Duration.ofSeconds(4L)) > 结果都把第一条和第二条数据归集到同一个窗口中了, > 都没有达到预想的结果。 > 要如何设置才能在窗口中仅有一条数据而忽略第二条数据? > > > [email protected] >
