You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Soheil Pourbafrani <so...@gmail.com> on 2018/07/16 12:45:15 UTC

method meaning of class Trigger

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?

Re: method meaning of class Trigger

Posted by vino yang <ya...@gmail.com>.
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 :
https://ci.apache.org/projects/flink/flink-docs-master/dev/event_time.html#event-time--processing-time--ingestion-time

Thanks, Vino

2018-07-16 20:49 GMT+08:00 Chesnay Schepler <ch...@apache.org>:

> 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?
>>
>
>
>

Re: method meaning of class Trigger

Posted by Chesnay Schepler <ch...@apache.org>.
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?