What is the purpose of 'lazy evaluation' in Spark?
Answer
To delay computation until an action is performed
Explanation
Spark uses lazy evaluation, meaning transformations (like map, filter) are not executed immediately. Instead, they build a Directed Acyclic Graph (DAG) of operations, and computation only occurs when an action (like count, collect, save) is called.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
Which command is used to create a new table in Hive?
View question →
Which of the following is NOT a daemon typically running on a Hadoop DataNode?
View question →
What is the primary role of the NodeManager in YARN?
View question →
What does the command 'hadoop fs -rm -r /user/data' do?
View question →
What is the main purpose of SparkContext in a Spark application?
View question →
What is the purpose of the '--target-dir' argument in Sqoop import?
View question →