Is a new window created for each key/group?

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

Is a new window created for each key/group?

Vadim Vararu
Hi guys,

I can see in many examples that window method is always preceded by keyBy:

data.keyBy(<key selector>)
.window(SlidingEventTimeWindows.of(Time.seconds(10), Time.seconds(5)))
.<windowed transformation>(<window function>)



Does it mean that a new window will be create for each group/key?

Thanks, Vadim.
Reply | Threaded
Open this post in threaded view
|

Re: Is a new window created for each key/group?

Sonex
Yes, you are correct. A window will be created for each key/group and then you can apply a function, or aggregate elements per key.