Details
-
New Feature
-
Status: In Progress
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
A recent use case involved the desire for "timer triggered" instead of "partition content change triggered" window aggregations. E.g., "I want to trigger an aggregation every second over the last 10 tuples in a window partition" – a count-based window with timer triggered aggregations.
I propose adding 3 methods to TWindow. Two in direct support of "timer triggered" aggregations (this processing model seems like it could be common enough to warrant making it conveniently available) and one to make it easier to use the lower level Window API to define and use other processing models.
I'm submitting a PR with the details for review but the net is these additions to TWindow:
```
<U> TStream<U> timedAggregate(long period, TimeUnit unit, BiFunction<List<T>, K, U> aggregator);
<U> TStream<U> timedBatch(long period, TimeUnit unit, BiFunction<List<T>, K, U> batcher);
<U, L extends List<T>> TStream<U> process(Window<T,K,L> window, BiFunction<List<T>, K, U> aggregator);
```
Attachments
Issue Links
- links to