title: Gzipping Har Files on HDFS using Spark
body: <p>I have huge data in hadoop archive <code>.har</code> format. Since, <code>har</code> doesn't include any compression, I am trying to further gzip it in and store in HDFS. The only thing I can get to work without error is :</p>
  
  <pre><code>harFile.coalesce(1, "true")
  .saveAsTextFile("hdfs://namenode/archive/GzipOutput", classOf[org.apache.hadoop.io.compress.GzipCodec])
  //`coalesce` because Gzip isn't splittable.
  </code></pre>
  
  <p>But, this doesn't give me the correct results. A Gzipped file is generated but with invalid output ( a single line saying the rdd type etc.)</p>
  
  <p>Any help will be appreciated. I am also open to any other approaches. </p>
  
  <p>Thanks.</p>