title: Spark not compressing json output
body: <p>I've added the following to my script:</p>
  
  <pre><code>val conf = new SparkConf
  conf.set("spark.hadoop.mapred.output.compress", "true")
  conf.set("spark.hadoop.mapred.output.compression.codec", "true")
  conf.set("spark.hadoop.mapred.output.compression.codec", "org.apache.hadoop.io.compress.GzipCodec")
  conf.set("spark.hadoop.mapred.output.compression.type", "BLOCK")
  </code></pre>
  
  <p>And I write the data like this <code>df.write.json("out")</code>. However, all I get is .json files in the output and not .json.gz as expected. What's wrong here?</p>