Databricks-Spark-Assoc Spark Architecture and Components Practice Question
Exhibit
org.apache.spark.SparkException: Job aborted due to stage failure: Task 5 in stage 1.0 failed 4 times ... executor lost: ExecutorLostFailure (executor 2 exited caused by one of the running tasks) Reason: Container killed by YARN for exceeding memory limits.
Refer to the exhibit. Based on the error log, what is the most likely cause of the job failure?
⚠ Common exam trap
Students often assume network timeouts or disk failures cause container terminations, missing explicit YARN memory limit violations indicated in executor error logs.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The executor ran out of memory while processing a task.
The error explicitly states that the container was killed by YARN for exceeding memory limits. This is a common issue in Spark when executors are assigned tasks that require more memory than what is available in the configured heap. Understanding this error is crucial because it indicates a need to either increase the `spark.executor.memory` setting or optimize the code to reduce the memory footprint of individual tasks during data processing.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The Spark Driver failed to schedule the tasks properly.
Why it's wrong here
The Driver successfully scheduled the task, but the executor failed during execution due to memory constraints. The error message indicates that the failure occurred at the container level (YARN), which means the task was already running when it hit the memory limit, not that the scheduling itself was faulty.
- ✓
The executor ran out of memory while processing a task.
Why this is correct
The error 'Container killed by YARN for exceeding memory limits' directly points to the executor consuming more memory than allocated. This often happens during heavy data manipulation, such as large joins or aggregations, where the memory demand exceeds the limits set for the JVM heap or off-heap memory.
- ✗
There was a network failure between the Driver and the worker.
Why it's wrong here
While 'ExecutorLostFailure' can sometimes be network-related, the specific reason provided—'exceeding memory limits'—rules out a simple network issue. The failure was caused by internal memory pressure on the executor container, which was detected and terminated by the resource manager to prevent node-level instability.
- ✗
The cluster manager was unable to find available nodes.
Why it's wrong here
The error log does not indicate an inability to provision resources; the executor was running before it was terminated. This means the resource manager had successfully allocated the container, but the application code subsequently requested more memory than the allocated container was allowed to use.
About these practice questions
This Databricks-Spark-Assoc question is part of Courseiva's 295-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Databricks exam blueprint
This Databricks-Spark-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-Spark-Assoc exam.