I'm a newbie on Flink. As my understanding, in Flink, a TaskManager can be devided into more than one slots, one slot can be assigned more than one tasks and one task is one thread.
Let's see the example WordCount:
As my understanding, one task is exactly one thread, there are three tasks: Source + map()
, keyBy()/window()/apply()
and Sink
. So each of them has its own threads, meaning that we need three threads for this example. We can put the three tasks (three threads) into one slot.
However, now I'm reading its official doc: https://ci.apache.org/projects/flink/flink-docs-stable/dev/parallel.html
A Flink program consists of multiple tasks (transformations/operators, data sources, and sinks). A task is split into several parallel instances for execution and each parallel instance processes a subset of the task’s input data. The number of parallel instances of a task is called its parallelism.
How to understand "A task is split into several parallel instances of execution"? Does "several parallel instances of execution" means multi threads? So one Task can be multi threads?
I'm confused now.