Sample questions
St Flink Runtime Checkpointing StateDifficulty 2
In Apache Flink 1.19's runtime architecture, which three components together make up a JobManager process?
- aDispatcher, TaskManager, and JobMaster
- bDispatcher, ResourceManager, and JobMaster✓
- cResourceManager, TaskManager, and a global Scheduler
- dJobMaster, TaskExecutor, and Dispatcher
Explanation:A JobManager process hosts the Dispatcher (REST endpoint for job submission), the ResourceManager (slot allocation across the cluster), and one JobMaster per running job (execution graph scheduling and failure handling). TaskManager/TaskExecutor is the worker process and is not part of the JobManager. The other options incorrectly place TaskManager/TaskExecutor inside the JobManager or invent a separate 'global Scheduler' component that doesn't exist.
St Flink Runtime Checkpointing StateDifficulty 1
What does a single task slot on a Flink TaskManager represent?
- aA fixed share of the TaskManager's resources, mainly managed memory✓
- bA separate JVM process launched per operator
- cA logical grouping of jobs submitted to the same cluster
- dA checkpoint interval boundary defined for a single operator
Explanation:A task slot is a subdivision of a TaskManager's resources — a TaskManager with 3 slots dedicates 1/3 of its managed memory to each slot. It is not a separate JVM (all slots of a TaskManager run in the same JVM), not a job grouping, and unrelated to checkpoint intervals.
St Flink Runtime Checkpointing StateDifficulty 2
By default in Flink, can subtasks belonging to different tasks of the same job share the same task slot?
- aNo — different tasks in a job are placed in separate slots
- bOnly if the tasks explicitly call
disableChaining() - cIt can in batch execution mode but not in streaming mode
- dYes, via Flink's default slot sharing group for the same job✓
Explanation:By default, all tasks of a job belong to the same slot sharing group, so subtasks from different tasks (e.g. source, map, sink) can occupy the same slot. This is independent of chaining (which fuses tasks into one thread) and applies to both streaming and batch execution.
St Flink Runtime Checkpointing StateDifficulty 3
A streaming job has a source (parallelism 4), a map (parallelism 4), and a sink (parallelism 2), all in the default slot sharing group. With slot sharing enabled, how many task slots does the job need at minimum to run?
- a10 — the sum of all tasks' parallelism
- b2 — the minimum parallelism among the job's tasks
- c4 — the maximum parallelism among the job's tasks✓
- d3 — the number of distinct tasks in the pipeline
Explanation:With slot sharing, each slot can hold one parallel pipeline slice covering every task in the sharing group. The number of slots needed therefore equals the job's maximum parallelism (4 here), not the sum of every task's parallelism. A total of 10 assumes a separate slot for every listed subtask and ignores sharing and chaining.
St Flink Runtime Checkpointing StateDifficulty 2
What does operator chaining do in Flink?
- aFuses compatible adjacent operator subtasks into a single task on one thread✓
- bMerges multiple parallel instances of the same operator into a single instance
- cAutomatically increases the parallelism of chained operators to match the source
- dMakes chained operators share one keyed-state namespace
Explanation:Operator chaining places adjacent operators that have the same parallelism and a forwarding (one-to-one) connection into one task, executed by a single thread — reducing thread hand-over and serialization/buffering overhead. It doesn't merge parallel instances into one, doesn't change parallelism, and chained operators keep their own separate state.
St Flink Runtime Checkpointing StateDifficulty 3
A DataStream pipeline is source -> map -> keyBy -> reduce -> sink. At which point does operator chaining necessarily break?
- aAt the
map, because map operators break chaining - bAt the
keyBy, because it requires a network shuffle (repartitioning) between map and reduce✓ - cAt the
sink, because sinks execute in a separate task slot - dNowhere — the whole pipeline chains into a single task since all operators have the same parallelism
Explanation:Chaining requires a forwarding (one-to-one, no repartitioning) connection between operators of equal parallelism. keyBy introduces a hash-partitioned shuffle across the network, which always breaks the chain at that point, regardless of parallelism settings.