Databricks Certified Associate Developer for Apache Spark — Question 166
Which of the following describes why garbage collection in Spark is important?
Answer options
- A. Logical results will be incorrect if inaccurate data is not collected and removed from the Spark job.
- B. Spark jobs will fail or run slowly if inaccurate data is not collected and removed from the Spark job.
- C. Spark jobs will fail or run slowly if memory is not available for new objects to be created.
- D. Spark jobs will produce inaccurate results if there are too many different transformations called before a single action.
- E. Spark jobs will produce inaccurate results if memory is not available for new tasks to run and complete.
Correct answer: C
Explanation
The correct answer, C, highlights that garbage collection is crucial for freeing up memory, allowing for the creation of new objects, which is essential for Spark jobs to run efficiently. Options A and B focus on inaccuracies due to data, which are not directly related to the role of garbage collection. Options D and E address issues related to transformations and task execution rather than the importance of managing memory through garbage collection.