Window division:
- Tumbling window (Tumbling Window, no overlap)
- Scroll window (Sliding Window, overlapping)
- Session window (Session Window, space activity)
Window Type:
Window before processing the data, the data will have to do triage, there are two ways to control flow, according to the data stream is divided: Keyed and Non-Keyed Windows.
Keyed Windows: is there a window in accordance with the packet data stream a field of use, can be understood as classified according to the original data stream of a key, the data stream has the same key value will be into the same window, multiple windows parallel logic flow.
Non-Keyed Windows: no window to use a field in accordance with data packets
Window operator:
Calculated based on the window data, called a window function. Support four:
1. Low ProcessWindowFunction efficiency, the entire window of data will be transmitted to the operator, see Code: Flink window Function - ProcessWindowFunction
2. ReduceFunction easy to use, recommended, Refer to code: Flink window Function - ReduceWordCount
3. AggregateFunction complex logic, see the code: Flink window Function - the AggregateFunction
4. FoldFunction outdated API, is not friendly enough, Refer to code: Flink window Function - FoldFunction