nerdexam
Databricks

DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK · Question #70

Which of the following statements about slots is incorrect?

The correct answer is A. Slots are the most granular level of execution in the Spark execution hierarchy. Option A is incorrect because tasks, not slots, are the most granular level of execution in Spark's hierarchy (Job → Stage → Task). Slots are not execution units themselves - they are parallel execution resources (threads/cores) within an executor that tasks are assigned to…

Spark Core Architecture and Execution Model

Question

Which of the following statements about slots is incorrect?

Options

  • ASlots are the most granular level of execution in the Spark execution hierarchy.
  • BSlots are resources for parallelization within an executor.
  • CTasks are assigned to slots for computation.
  • DThere can be more slots than tasks.
  • EThere must be at least as many slots as there are executors.

How the community answered

(40 responses)
  • A
    90% (36)
  • B
    3% (1)
  • C
    3% (1)
  • E
    5% (2)

Explanation

Option A is incorrect because tasks, not slots, are the most granular level of execution in Spark's hierarchy (Job → Stage → Task). Slots are not execution units themselves - they are parallel execution resources (threads/cores) within an executor that tasks are assigned to.

Why the distractors are correct statements (and thus wrong answer choices):

  • B is true: slots represent parallelism capacity within a single executor - an executor with 4 cores has 4 slots.
  • C is true: Spark's scheduler assigns individual tasks to available slots, which then perform the computation.
  • D is true: if you provision 16 slots but a stage only has 3 tasks, 13 slots sit idle - slots can outnumber tasks.
  • E is true: since each executor has at least 1 slot (set by spark.executor.cores), the slot count must be ≥ the executor count.

Memory tip: Think of slots as parking spaces and tasks as cars. The parking spaces (slots) belong to a garage (executor) and enable parallel parking (parallelism), but the cars (tasks) are the things actually doing the driving - they're the granular units of work. A car needs a space, not the other way around.

Topics

#spark execution hierarchy#slots and tasks#executor resource management#parallelization

Community Discussion

No community discussion yet for this question.

Full DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Practice