You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by M Singh <ma...@yahoo.com> on 2017/11/14 18:12:52 UTC

Apache Flink - Question about Global Windows

Hi:
I am reading about global windows and the documentation indicates:
'A global windows assigner assigns all elements with the same key to the same single global window'

From my understanding if we have a keyed stream - then all elements with the same key are also assigned to a single window.  I understand that global windows never trigger window computation.  But is there any other the difference between the two windows (global vs non-global) ?  
Thanks
Mans


Re: Apache Flink - Question about Global Windows

Posted by M Singh <ma...@yahoo.com>.
Hi Xingcan:  Thanks for your response.
So to summarize - global windows can be applied to keyed and non keyed windows - we only have to specify trigger with it to invoke the computation function.
Thanks
Mans 

    On Wednesday, November 15, 2017 5:43 AM, Xingcan Cui <xi...@gmail.com> wrote:
 

 Hi Mans,
the "global" here indicates the "horizontal" (count, time, etc.) dimension instead of the "vertical" (keyBy) dimension, i.e., all the received data will be placed into a single huge window. Actually, it's an orthogonal concept with the KeyBy operations since both DataStream and KeyedStream can define their own global windows. Compared with other windows (e.g., tumbling or sliding ones), it's more flexible to implement your own triggers on it. 
Hope that helps.
Best,Xingcan
On Wed, Nov 15, 2017 at 2:12 AM, M Singh <ma...@yahoo.com> wrote:

Hi:
I am reading about global windows and the documentation indicates:
'A global windows assigner assigns all elements with the same key to the same single global window'

From my understanding if we have a keyed stream - then all elements with the same key are also assigned to a single window.  I understand that global windows never trigger window computation.  But is there any other the difference between the two windows (global vs non-global) ?  
Thanks
Mans





   

Re: Apache Flink - Question about Global Windows

Posted by Xingcan Cui <xi...@gmail.com>.
Hi Mans,

the "global" here indicates the "horizontal" (count, time, etc.) dimension
instead of the "vertical" (keyBy) dimension, i.e., all the received data
will be placed into a single huge window. Actually, it's an orthogonal
concept with the *KeyBy* operations since both *DataStream* and
*KeyedStream* can define their own global windows. Compared with other
windows (e.g., tumbling or sliding ones), it's more flexible to implement
your own triggers on it.

Hope that helps.

Best,
Xingcan

On Wed, Nov 15, 2017 at 2:12 AM, M Singh <ma...@yahoo.com> wrote:

> Hi:
>
> I am reading about global windows and the documentation indicates:
>
> 'A *global windows* assigner assigns all elements with the same key to
> the same single *global window'*
>
> From my understanding if we have a keyed stream - then all elements with
> the same key are also assigned to a single window.  I understand that
> global windows never trigger window computation.  But is there any other
> the difference between the two windows (global vs non-global) ?
>
> Thanks
>
> Mans
>
>
>