You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Alberto Ramón <a....@gmail.com> on 2016/10/24 15:10:23 UTC

Trigger evaluate

Hello, 1 doubt:

By default, when Trigger is launch to evaluate data of window ?
 - New element in window?
 - When a watermark arrive?
 - When the window is moved?

Thanks , Alb

Re: Trigger evaluate

Posted by Fabian Hueske <fh...@gmail.com>.
No, this is correct. It describes how a Trigger is called, i.e., Flink
calls for each element that is inserted into a window the
Trigger.onElement() method.
The default trigger of a TimeWindow does not fire on new elements. However,
a custom trigger might fire when onElement() is called.

2016-10-24 21:37 GMT+02:00 Alberto Ramón <a....@gmail.com>:

>
>
> <https://flink.apache.org/news/2015/12/04/Introducing-windows.html>
> this is a mistake ?
> <https://flink.apache.org/news/2015/12/04/Introducing-windows.html>
>
>
>
> *"The trigger is called for each element that is inserted into the window
> and when a previously registered timer times out"*
> Thanks !!
>
> 2016-10-24 20:45 GMT+02:00 Fabian Hueske <fh...@gmail.com>:
>
>> The window is evaluated when a watermark arrives that is behind the
>> window's end time.
>>
>> For instance, give the window in your example there are windows that end
>> at 1:00:00, 1:00:30, 1:01:00, 1:01:30, ... (every 30 seconds).
>> given the windows above, the window from 00:59:00 to 1:00:00 will be
>> evaluated, when a watermark of 1:00:00 or later is received. It might also
>> happen that multiple windows are evaluated if watermarks are more than 30
>> seconds apart.
>>
>> Best, Fabian
>>
>> 2016-10-24 20:38 GMT+02:00 Alberto Ramón <a....@gmail.com>:
>>
>>> I mean about *default Trigge*r, when you only put this:
>>>
>>>  .timeWindow(Time.minutes(1), Time.seconds(30))
>>>   .sum(1)
>>>
>>> When data window is evaluated ?
>>>
>>> this <https://github.com/apache/flink/tree/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/triggers> is related?
>>>
>>>
>>>
>>> 2016-10-24 19:39 GMT+02:00 Aljoscha Krettek <al...@apache.org>:
>>>
>>>> Hi,
>>>> this depends on the Trigger you're using. For example, EventTimeTrigger
>>>> will trigger when the watermark passes the end of a window.
>>>>
>>>> Cheers,
>>>> Aljoscha
>>>>
>>>> On Mon, 24 Oct 2016 at 17:10 Alberto Ramón <a....@gmail.com>
>>>> wrote:
>>>>
>>>>> Hello, 1 doubt:
>>>>>
>>>>> By default, when Trigger is launch to evaluate data of window ?
>>>>>  - New element in window?
>>>>>  - When a watermark arrive?
>>>>>  - When the window is moved?
>>>>>
>>>>> Thanks , Alb
>>>>>
>>>>
>>>
>>
>

Re: Trigger evaluate

Posted by Alberto Ramón <a....@gmail.com>.
<https://flink.apache.org/news/2015/12/04/Introducing-windows.html>
this is a mistake ?
<https://flink.apache.org/news/2015/12/04/Introducing-windows.html>



*"The trigger is called for each element that is inserted into the window
and when a previously registered timer times out"*
Thanks !!

2016-10-24 20:45 GMT+02:00 Fabian Hueske <fh...@gmail.com>:

> The window is evaluated when a watermark arrives that is behind the
> window's end time.
>
> For instance, give the window in your example there are windows that end
> at 1:00:00, 1:00:30, 1:01:00, 1:01:30, ... (every 30 seconds).
> given the windows above, the window from 00:59:00 to 1:00:00 will be
> evaluated, when a watermark of 1:00:00 or later is received. It might also
> happen that multiple windows are evaluated if watermarks are more than 30
> seconds apart.
>
> Best, Fabian
>
> 2016-10-24 20:38 GMT+02:00 Alberto Ramón <a....@gmail.com>:
>
>> I mean about *default Trigge*r, when you only put this:
>>
>>  .timeWindow(Time.minutes(1), Time.seconds(30))
>>   .sum(1)
>>
>> When data window is evaluated ?
>>
>> this <https://github.com/apache/flink/tree/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/triggers> is related?
>>
>>
>>
>> 2016-10-24 19:39 GMT+02:00 Aljoscha Krettek <al...@apache.org>:
>>
>>> Hi,
>>> this depends on the Trigger you're using. For example, EventTimeTrigger
>>> will trigger when the watermark passes the end of a window.
>>>
>>> Cheers,
>>> Aljoscha
>>>
>>> On Mon, 24 Oct 2016 at 17:10 Alberto Ramón <a....@gmail.com>
>>> wrote:
>>>
>>>> Hello, 1 doubt:
>>>>
>>>> By default, when Trigger is launch to evaluate data of window ?
>>>>  - New element in window?
>>>>  - When a watermark arrive?
>>>>  - When the window is moved?
>>>>
>>>> Thanks , Alb
>>>>
>>>
>>
>

Re: Trigger evaluate

Posted by Fabian Hueske <fh...@gmail.com>.
The window is evaluated when a watermark arrives that is behind the
window's end time.

For instance, give the window in your example there are windows that end at
1:00:00, 1:00:30, 1:01:00, 1:01:30, ... (every 30 seconds).
given the windows above, the window from 00:59:00 to 1:00:00 will be
evaluated, when a watermark of 1:00:00 or later is received. It might also
happen that multiple windows are evaluated if watermarks are more than 30
seconds apart.

Best, Fabian

2016-10-24 20:38 GMT+02:00 Alberto Ramón <a....@gmail.com>:

> I mean about *default Trigge*r, when you only put this:
>
>  .timeWindow(Time.minutes(1), Time.seconds(30))
>   .sum(1)
>
> When data window is evaluated ?
>
> this <https://github.com/apache/flink/tree/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/triggers> is related?
>
>
>
> 2016-10-24 19:39 GMT+02:00 Aljoscha Krettek <al...@apache.org>:
>
>> Hi,
>> this depends on the Trigger you're using. For example, EventTimeTrigger
>> will trigger when the watermark passes the end of a window.
>>
>> Cheers,
>> Aljoscha
>>
>> On Mon, 24 Oct 2016 at 17:10 Alberto Ramón <a....@gmail.com>
>> wrote:
>>
>>> Hello, 1 doubt:
>>>
>>> By default, when Trigger is launch to evaluate data of window ?
>>>  - New element in window?
>>>  - When a watermark arrive?
>>>  - When the window is moved?
>>>
>>> Thanks , Alb
>>>
>>
>

Re: Trigger evaluate

Posted by Alberto Ramón <a....@gmail.com>.
I mean about *default Trigge*r, when you only put this:

 .timeWindow(Time.minutes(1), Time.seconds(30))
  .sum(1)

When data window is evaluated ?

this <https://github.com/apache/flink/tree/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/triggers>
is related?



2016-10-24 19:39 GMT+02:00 Aljoscha Krettek <al...@apache.org>:

> Hi,
> this depends on the Trigger you're using. For example, EventTimeTrigger
> will trigger when the watermark passes the end of a window.
>
> Cheers,
> Aljoscha
>
> On Mon, 24 Oct 2016 at 17:10 Alberto Ramón <a....@gmail.com>
> wrote:
>
>> Hello, 1 doubt:
>>
>> By default, when Trigger is launch to evaluate data of window ?
>>  - New element in window?
>>  - When a watermark arrive?
>>  - When the window is moved?
>>
>> Thanks , Alb
>>
>

Re: Trigger evaluate

Posted by Aljoscha Krettek <al...@apache.org>.
Hi,
this depends on the Trigger you're using. For example, EventTimeTrigger
will trigger when the watermark passes the end of a window.

Cheers,
Aljoscha

On Mon, 24 Oct 2016 at 17:10 Alberto Ramón <a....@gmail.com>
wrote:

> Hello, 1 doubt:
>
> By default, when Trigger is launch to evaluate data of window ?
>  - New element in window?
>  - When a watermark arrive?
>  - When the window is moved?
>
> Thanks , Alb
>