title: How to execute a spark transformation eagerly?
body: <p>As the transformations in spark are lazily evaluated, is there any way we can execute the transformation eagerly?</p>
  
  <p>Is there any configuration change required to do that?</p>
  
  <p>For example, I have the following scala code sample:</p>
  
  <pre><code>val args = Array("/Users/kvkv/Documents/backups/h/FeedsData.txt",
                  "/Users/kvkv/Documents/backups/h/spark/output/FeedsDataOutput")
  val conf = new SparkConf();
  val sc = new SparkContext("local", "FeedsData.txt", conf);
  val input= sc.textFile(args(0));
  val feedsRdd = input.filter(line =&gt; line.contains("Feeds Info : "))
  val feedswords = feedsRdd.flatMap(line =&gt; line.split(" "));
  val counts = feedswords.map(word =&gt; (word, 1)).reduceByKey{case (x, y) =&gt; x+y}
  counts.saveAsTextFile(args(1))
  </code></pre>
  
  <p>As per normal executions, all transformations will be executed once an action is called.</p>
  
  <p>Can any of these transformation be executed prior to action?</p>