Standard method to generate watermark forBoundedOutOfOrderness

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Standard method to generate watermark forBoundedOutOfOrderness

Maminspapin
Hello, everyone.

I'm learning Flink but still not sure if I realise the topic of watermark
mechanism.

That is a simple common example of pipeline with event-time mode:

<http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/file/t2998/photo_2021-02-27_23-28-29.jpg>

I want to use strategy
*WatermarkStrategy.forBoundedOutOfOrderness(Duration.ofSecond(6))* in my
code. Does it mean that this strategy is working by formula:

*max(event_time) - 6 sec. = new watermark?*

So there are next steps:
0. At first we have w(0) and no input events
1. Get 4.      4 is new max. -> 4-6 < 0 -> still w(0)
2. Get 2.      2 < 4 -> 4 is max -> still w(0)
3. Get 11.    11 > 4 -> 11 is new max -> 11-6 = 5 -> new watermark w(5)
4. Get 7.      11 is max. -> still w(5)
5. Get 9.      11 is max. -> still w(5)
6. Get 15      15 > 11 -> 15 is new max -> 15-6 = 9 -> new watermark w(9)

Am I right?

Thanks,
Yuri L.



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/