Hi,
I’m not if I understand your question/concerns.
As Rong Rong explained, key selector is used to assign records to window
operators.
Within key context, you do not have access to other keys/values in your
operator/functions, so your reduce/process/… functions when processing key:1
won’t
Sorry, I still don't understand. Can I ask for help again?
For example, the degree of parallelism is 2, which will produce two Window
threads.
).setParallelism(2)
).These two windows are how to read their own partition data.
).input data
1 2 3 4 5 6 7 8 9 10
).source -> operator ->
Hi
I am not sure if I understand your question correctly, so will try to
explain the flow how elements gets into window operators.
Flink makes the partition assignment before invoking the operator to
process element. For the word count example, WindowOperator is invoked by
). Environment Flink1.7.2 WordCount local, stream processing
).source RecordWriter.emit(), for each element by key, divided into different
partitions, the partition location of each element has been determined, the
number of partitions is determined by DataStream.setParallelism(2)
). By