Flink窗口函数
滚动窗口(Trumblingwindow)
时间对齐,窗口长度固定,没有重叠
WindowedStream<Tuple2<String, Integer>, Tuple, TimeWindow> timeWindow = keyedStream.timeWindow(Time.seconds(10));
滚动事件窗口
WindowedStream<Tuple2<String, Integer>, Tuple, GlobalWindow> countWindow = keyedStream.countWindow(3);
滑动窗口(SlidingWindow)
滑动窗口是固定窗口更广义的一种形式,滑动窗口由固定窗口长度和滑动间隔组成。
特点:窗口长度固定,可以有重叠