title: lazy evaluation in Apache Spark
body: <p>I'm trying to understand lazy evaluation in Apache spark.
  My understanding says:</p>
  
  <p>Lets say am having Text file in hardrive.</p>
  
  <p>Steps:</p>
  
  <p>1) First I'll create RDD1, that is nothing but a data definition right now.(No data loaded into memory right now)</p>
  
  <p>2) I apply some transformation logic on RDD1 and creates RDD2, still here RDD2 is data definition (Still no data loaded into memory)</p>
  
  <p>3) Then I apply filter on RDD2 and creates RDD3 (Still no data loaded into memory and RDD3 is also an data definition)</p>
  
  <p>4) I perform an action so that I could get RDD3 output in text file. So the moment I perform this action where am expecting output something from memory, then spark loads data into memory creates RDD1, 2 and 3 and produce output.</p>
  
  <p>So laziness of RDDs in spark says just keep making the roadmap(RDDs) until they dont get the approval to make it or produce it live.</p>
  
  <p>Is my understanding correct upto here...?  </p>
  
  <p>My second question here is, its said that its(Lazy Evaluation) one of the reason that the spark is powerful than Hadoop, May I know please how because am not much aware of Hadoop ? What happens in hadoop in this scenario ?</p>
  
  <p>Thanks :) </p>