title: Spark Standalone Mode: How to compress spark output written to HDFS
body: <p>Related to my other question, but distinct:</p>
  
  <pre><code>someMap.saveAsTextFile("hdfs://HOST:PORT/out")
  </code></pre>
  
  <p>If I save an RDD to HDFS, how can I tell spark to compress the output with gzip?
  In Hadoop, it is possible to set</p>
  
  <pre><code>mapred.output.compress = true
  </code></pre>
  
  <p>and choose the compression algorithm with</p>
  
  <pre><code>mapred.output.compression.codec = &lt;&lt;classname of compression codec&gt;&gt;
  </code></pre>
  
  <p>How would I do this in spark? Will this work as well?</p>
  
  <p><strong>edit</strong>: using spark-0.7.2</p>