GaryGao created FLINK-20190:
-------------------------------
Summary: A New Window Trigger that can trigger window operation by
event time interval、event count
Key: FLINK-20190
URL: https://issues.apache.org/jira/browse/FLINK-20190
Project: Flink
Issue Type: New Feature
Components: API / DataStream
Reporter: GaryGao
Fix For: 1.12.0
In production environment, when we are do some window operation, such as window
aggregation, using data stream api, developers are always asked to not only
trigger the window operation when the watermark pass the max timestamp of
window, but also trigger it both by fixed event time interval and fixed count
of event.The reason why we want to do this is we are looking forward to get the
frequently updated window operation result, other than waiting for a long time
until the watermark pass the max timestamp of window.This is very useful in
reporting and other BI applications.
For now the default triggers provided by flink can not close this requirement,
so I developed a New Trigger, so called CountAndContinuousEventTimeTrigger,
combine ContinuousEventTimeTrigger with CountTrigger to do the above thing.
To use CountAndContinuousEventTimeTrigger, you should specify two parameters as
revealed in it constructor:
{code:java}
private CountAndContinuousEventTimeTrigger(Time interval, long maxCount);{code}
* Time interval, it means this trigger will continuously fires based on a
given time interval, the same as ContinuousEventTimeTrigger.
* long maxCount, it means this trigger will fires once the count of elements
in a pane reaches the given count, the same as CountTrigger.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)