Re: How to trigger only once for each window when using TumblingProcessingTimeWindows?

2020-08-19 Thread David Anderson
The purpose of the reduce() and aggregate() methods on windows is to allow for incremental computation of window results. This has two principal advantages: (1) the computation of the results is spread out, rather than occurring all in one go at the end of each window, thereby reducing the

How to trigger only once for each window when using TumblingProcessingTimeWindows?

2020-08-19 Thread wangl...@geekplus.com
Read Kafka message and keyBy by tableName, then write the message list to DataBase with batchUpdate keyedStream.window(TumblingProcessingTimeWindows.of(Time.seconds(1))).aggregate(new ListAggregate()).addSink(new TemplateMySQLSink()); It seems that for every record comming, the aggregate