title: Saving dataframe to local file system results in empty results
body: <p>We are running spark 2.3.0 on <code>AWS EMR</code>. The following <code>DataFrame</code> "<code>df</code>" is non empty and of modest size:</p>
  
  <pre><code>scala&gt; df.count
  res0: Long = 4067
  </code></pre>
  
  <p>The following code works fine for writing <code>df</code> to <code>hdfs</code>:</p>
  
  <pre><code>   scala&gt; val hdf = spark.read.parquet("/tmp/topVendors")
  hdf: org.apache.spark.sql.DataFrame = [displayName: string, cnt: bigint]
  
  scala&gt; hdf.count
  res4: Long = 4067
  </code></pre>
  
  <p>However using the same code to write to a local <code>parquet</code> or <code>csv</code> file end up with empty results:</p>
  
  <pre><code>df.repartition(1).write.mode("overwrite").parquet("file:///tmp/topVendors")
  
  scala&gt; val locdf = spark.read.parquet("file:///tmp/topVendors")
  org.apache.spark.sql.AnalysisException: Unable to infer schema for Parquet. It must be specified manually.;
    at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$9.apply(DataSource.scala:207)
    at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$9.apply(DataSource.scala:207)
    at scala.Option.getOrElse(Option.scala:121)
  </code></pre>
  
  <p>We can see why it fails:</p>
  
  <pre><code> ls -l /tmp/topVendors
  total 0
  -rw-r--r-- 1 hadoop hadoop 0 Jul 30 22:38 _SUCCESS
  </code></pre>
  
  <p>So there is <em>no</em> parquet file being written.</p>
  
  <p>I have tried this maybe twenty times and for both <code>csv</code> and <code>parquet</code> and on two different <code>EMR</code> Servers:  this same behavior is exhibited in all cases.</p>
  
  <p>Is this an <code>EMR</code> specific bug? A more general <code>EC2</code> bug? Something else?  This code works on <code>spark</code> on <code>macOS</code>.</p>
  
  <p>In case it matters - here is the versioning info:</p>
  
  <pre><code>Release label:emr-5.13.0
  Hadoop distribution:Amazon 2.8.3
  Applications:Spark 2.3.0, Hive 2.3.2, Zeppelin 0.7.3
  </code></pre>