H13-711 practice question 30 of 30

When a Spark application runs, if a certain operation fails, the entire app fails.

Full set: 201 questions
Answer options
A: True
B: False
Correct Answer:
FALSE
Explanation

The statement is incorrect. Apache Spark is fundamentally designed with fault tolerance as a core feature. This resilience is primarily achieved through its core abstraction, the Resilient Distributed Dataset (RDD). Spark maintains the lineage of each RDD, which is the complete sequence of transformations used to create it from a stable data source. If a task operating on a data partition fails (e.g., due to a worker node crash), Spark's scheduler can use the lineage graph to recompute only the lost partition on another available worker node. A single operation failure does not cause the entire application to fail; instead, Spark will attempt to retry the failed task a configurable number of times (defined by spark.task.maxFailures, which defaults to 4). The entire application or stage will only be aborted if a task fails more than this configured number of retries.

Why Incorrect

The "True" option is incorrect because it contradicts the fundamental design principle of resilience in Apache Spark. If any single operation failure caused the entire application to fail, Spark would be impractical for large-scale, long-running jobs in distributed environments where transient failures are common. The system's ability to recover from task failures without aborting the entire application is one of its key advantages.

References

1. Zaharia, M., Chowdhury, M., Franklin, M. J., Shenker, S., & Stoica, I. (2012). Resilient Distributed Datasets: A Fault-Tolerant Abstraction for In-Memory Cluster Computing. In Proceedings of the 9th USENIX Symposium on Networked Systems Design and Implementation (NSDI '12).

Section 3, "Resilient Distributed Datasets (RDDs)": "The most important property of RDDs is that they are fault-tolerant. RDDs track the graph of transformations that were used to build them (their lineage) to recompute lost data. [...] if a partition of an RDD is lost, the RDD has enough information about how it was derived from other datasets to recompute just that partition." This directly explains the mechanism that prevents a single failure from crashing the application.

DOI: https://doi.org/10.5555/2228298.2228301

2. Official Apache Spark Documentation. Application Scheduling - Fault Tolerance.

Section: "Fault Tolerance for Tasks": The documentation states, "The driver will also re-execute tasks if they fail. It will retry a configurable number of times (spark.task.maxFailures) before giving up on the job." This confirms that task failures lead to retries, not immediate application failure.

3. Karau, H., Konwinski, A., Wendell, P., & Zaharia, M. (2015). Learning Spark: Lightning-Fast Big Data Analysis. O'Reilly Media.

Chapter 2, "Downloading Spark and Getting Started": In the section on Spark's components, the text describes the fault-tolerance mechanism: "If a worker running a task fails, Spark will rerun the task on another node." This is a foundational concept introduced early in official learning materials.

4. University of California, Berkeley. CS 186/286: Introduction to Database Systems / Advanced Topics in Database Systems.

Lecture Notes on Spark: Course materials frequently cover Spark's architecture. The lectures on RDDs emphasize their immutability and lineage as the basis for fault tolerance. They explain that unlike systems that rely on data replication for fault tolerance, Spark's lineage-based approach allows it to recover lost data partitions by re-executing the necessary transformations, thus handling task failures gracefully without halting the entire application.

Scroll to Top