OnWindowedStream
Wraps a joined data stream, allowing to use anonymous partial functions to perform extraction of items in a tuple, case class instance or collection
- Type parameters:
- K
The type of key
- T
The type of the data stream items from the right input of the join
- W
The type of the window
- Value parameters:
- stream
The wrapped data stream
Value members
Concrete methods
Applies a reduce function to the window. The window function is called for each evaluation of the window for each key individually. The output of the reduce function is interpreted as a regular non-windowed stream.
Applies a reduce function to the window. The window function is called for each evaluation of the window for each key individually. The output of the reduce function is interpreted as a regular non-windowed stream.
This window will try and pre-aggregate data as much as the window policies permit. For example,tumbling time windows can perfectly pre-aggregate the data, meaning that only one element per key is stored. Sliding time windows will pre-aggregate on the granularity of the slide interval, so a few elements are stored per key (one per slide interval). Custom windows may not be able to pre-aggregate, or may need to store extra values in an aggregation tree.
- Value parameters:
- function
The reduce function.
- Returns:
The data stream that is the result of applying the reduce function to the window.