Question
Why should Spark closures avoid capturing a large enclosing object?
Select an option. Your answer will be checked instantly.
Correct Answer: D. The object may be serialized and sent to every executor task
Explanation:
Unnecessary closure capture increases network and memory overhead.
Extracting only required fields produces smaller serialized functions.
Leave a Reply