title: How to read the data from a dataframe without using collect method in Spak/Scala
body: <p>I have a dataframe which contains 2 million records. I want to read each record for my analysis.</p>
  
  <p>But when i use <code>dataframe.collect()</code> method which will bring the data from all nodes locally where driver program is running, which would impact achieving parallelism. Is there any solution?</p>
  
  <p>My Configuration is:</p>
  
  <pre><code>Cloudera:CDH 5.9.1
  Cluster Nodes:5 -&gt;each 8GB RAM
  Spark:1.6
  Scala:10.5
  </code></pre>