title: Where on earth to spark read local file when running an application in client mode
body: <p>I am deploying a spark <strong>Standalone</strong> cluster.172.16.133.15 is a Master with two Workers all in one machine, and it's deployed in ubuntu14.10.</p>
  
  <p>As the doc says, I can run applications with both "client mode" or "cluster mode". </p>
  
  <p>My questions is:</p>
  
  <p>1) Where to load file when running an application in client mode (in windows machine)??</p>
  
  <pre><code>SparkConf conf = new SparkConf().setAppName("Test")
                                  .setMaster("172.16.133.15")
                                  .set("spark.submit.deployMode", "client");
  JavaSparkContext sc = new JavaSparkContext(conf);
  String path = "file:///C:\\Users\\Me\\Desktop\\demo\\1530699196271";
  JavaPairRDD&lt;String, String&gt; rdd = sc.wholeTextFiles(path);
  
   JavaPairRDD&lt;String, String&gt; transformed = rdd.mapToPair(tuple2 -&gt;{
         String fname = tuple2._1();
         String content = tuple2._2();
         content = YUVSimpleTrans.transform(content);
         return new Tuple2&lt;&gt;(fname, content);
   });
   transformed.saveAsTextFile("file:///C:/Users/Me/Desktop/demo/out");
  </code></pre>
  
  <p>when I run the codes, I got exception : </p>
  
  <pre><code>Caused by: java.lang.RuntimeException: Error while running command to get 
  file permissions : java.io.IOException: (null) entry in command string: null ls -F C:\Users\Me\Desktop\demo\1530699196271\split_0.yuv
  at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:762)
  ....
  test.sparker4m.Sparker4mApplication.main(Sparker4mApplication.java:51)
  ...
  </code></pre>
  
  <p>I don't know why it use "ls -F". </p>
  
  <p>So I build a cifs directory with samba in 172.16.133.15, and upload all files in the direcotry "/usr/local/test/1530699196271", and modify the "path" variable, then it throw an exception: </p>
  
  <pre><code>Caused by: org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: file:/usr/local/test/1530699196271
  at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.singleThreadedListStatus(FileInputFormat.java:321)
  ... 31 more
  </code></pre>
  
  <p>I very confused that what the hell the "client mode" working.</p>
  
  <hr>
  
  <ol start="2">
  <li>Does "cluster mode" upload jar file to the Master when use "spark-submit"?</li>
  </ol>
  
  <p>if it's true, if I run my code use "spark-submit" with cluster mode (upload files 
   to Master(172.16.133.15) which has two workers ) will it work?</p>