Question
What is a closure?
Select an option. Your answer will be checked instantly.
Correct Answer: C. A function that captures variables from its surrounding scope
Explanation:
The function carries references to external values it uses.
Spark must serialize captured values when sending closures to executors.
Leave a Reply