method meaning of class Trigger

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

method meaning of class Trigger

Soheil Pourbafrani
Hi, 

In extending class Trigger we have methods like onElement, onProcessingTime and onEventTime. I know the method onElement will be called when a element is added to the window, but I have no idea about when two other methods onProcessingTime and onEventTime will be called?
Reply | Threaded
Open this post in threaded view
|

Re: method meaning of class Trigger

Chesnay Schepler
Did you read the documentation?
https://ci.apache.org/projects/flink/flink-docs-master/dev/stream/operators/windows.html#triggers

On 16.07.2018 14:45, Soheil Pourbafrani wrote:
> Hi,
>
> In extending class Trigger we have methods like onElement,
> onProcessingTime and onEventTime. I know the method onElement will be
> called when a element is added to the window, but I have no idea about
> when two other methods onProcessingTime and onEventTime will be called?


Reply | Threaded
Open this post in threaded view
|

Re: method meaning of class Trigger

vino yang
Hi Soheil,

Flink support many kinds of time window. The "onXXXTime" interface method would be triggered based on the time characteristic you chose, you should read the documentation that Chesnay provided and this documentation : 

Thanks, Vino

2018-07-16 20:49 GMT+08:00 Chesnay Schepler <[hidden email]>:
Did you read the documentation? https://ci.apache.org/projects/flink/flink-docs-master/dev/stream/operators/windows.html#triggers


On 16.07.2018 14:45, Soheil Pourbafrani wrote:
Hi,

In extending class Trigger we have methods like onElement, onProcessingTime and onEventTime. I know the method onElement will be called when a element is added to the window, but I have no idea about when two other methods onProcessingTime and onEventTime will be called?