Apache Flink - Question about Global Windows

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

Apache Flink - Question about Global Windows

M Singh
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


Reply | Threaded
Open this post in threaded view
|

Re: Apache Flink - Question about Global Windows

Xingcan Cui
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 <[hidden email]> 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



Reply | Threaded
Open this post in threaded view
|

Re: Apache Flink - Question about Global Windows

M Singh
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 <[hidden email]> 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 <[hidden email]> 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