Hi Vishnu Viswanath,

The keyed elements are spread across the 50 task slots (assuming you
have a parallelism of 50) using hash partitioning on the keys. Each
task slot runs one or multiple operators (depending on the slot
sharing options). One of them is a WindowOperator which will decide
when to trigger and process your keyed elements.

The WindowOperator holds the WindowAssigner and the Trigger. The
WindowAssigner will determine which window an incoming element gets
assigned. Windows are kept for each key; the combination of window and
key is usually called Pane. The Trigger will go through all the Panes
and check if they should fire or not (whether the window function
should be executed). This happens one after another in a single task
slot but in parallel across all the task slots.

Just a brief explanation. Hope it helps :)

Cheers,
Max

On Thu, Jul 28, 2016 at 5:49 PM, Vishnu Viswanath
<vishnu.viswanat...@gmail.com> wrote:
> Hi,
>
> Lets say I have a window on a keyed stream, and I have about 100 unique
> keys.
> And assume I have about 50 tasks slots in my cluster. And suppose my trigger
> fired 70/100 windows/pane at the same time.
>
> How will flink handle this? Will it assign 50/70 triggered windows to the 50
> available task slots and wait for 20 of them to finish before assigning the
> remaining 20 to the slots?
>
> Thanks,
> Vishnu Viswanath

Reply via email to