title: Spark wholeTextFiles difference between shell and app
body: <p>I've copy-pasted a line that looks like this</p>
  
  <pre><code>val files = sc.wholeTextFiles("file:///path/to/files/*.csv")
  </code></pre>
  
  <p>from the Spark shell, where it runs, to an application, where it does not run. Instead I get that the pattern matches 0 files even though in the shell I can see all the files and Spark reads them.</p>
  
  <p>What am I missing? Is this a file permissions problem?</p>
  
  <p>I'm running the app as follows:</p>
  
  <pre><code>spark-submit \
    --master yarn \
    --deploy-mode cluster \
    --files /usr/hdp/current/spark/conf/hive-site.xml \
    --num-executors 20 \
    --driver-memory 8G \
    --executor-memory 4G \
    --class com.myorg.pkg.MyApp \
    MyApp-assembly-0.1.jar
  </code></pre>