title: Spark: how to use SparkContext.textFile for local file system
body: <p>I'm just getting started using Apache Spark (in Scala, but the language is irrelevant).  I'm using <strong>standalone mode</strong> and I'll want to process a text file from a <strong>local file system</strong> (so nothing distributed like HDFS).</p>
  
  <p>According to the documentation of the <code>textFile</code> method from <code>SparkContext</code>, it will</p>
  
  <blockquote>
    <p>Read a text file from HDFS, a local file system (available on all
    nodes), or any Hadoop-supported file system URI, and return it as an
    RDD of Strings.</p>
  </blockquote>
  
  <p>What is unclear for me is if the whole text file can just be copied to all the nodes, or if the input data should already be partitioned, e.g. if using 4 nodes and a csv file with 1000 lines, have 250 lines on each node.</p>
  
  <p>I suspect each node should have the whole file but I'm not sure.</p>