Spark
is intellectual in the manner in which it operates on data. When you tell Spark
to operate on a given dataset, it heeds the instructions and makes a note of
it, so that it does not forget – but it does nothing, unless asked for the
final result. When a transformation like map () is called on a RDD-the
operation is not performed immediately. Transformations in Spark are not
evaluated till you perform an action. This helps optimize the overall data
processing workflow.