title: ZipFileOutputFormat not giving output in .zip format mapreduce
body: <p>i have an application where i read HBase and write records into files.
  Final output should be in .zip compressed format not hadoop supported format .
  For this i have used custom ZipFileOutputFormat  to get records in .zip files.</p>
  
  <p>Here is my implementation </p>
  
  <pre><code>ZipFileOutputFormat.setOutputPath(job, new Path(args[1]));
  </code></pre>
  
  <p>This is details of the ZipFileOutputFormat.class </p>
  
  <pre><code>public class ZipFileOutputFormat extends FileOutputFormat&lt;NullWritable, Text&gt; {
      @Override
      public RecordWriter&lt;NullWritable, Text&gt; getRecordWriter(
              TaskAttemptContext job) throws IOException, InterruptedException {
          Path file = getDefaultWorkFile(job, ".zip");
  
          FileSystem fs = file.getFileSystem(job.getConfiguration());
  
          return new ZipRecordWriter(fs.create(file, false));
      }
  
      public static class ZipRecordWriter extends
              RecordWriter&lt;NullWritable, Text&gt; {
          protected ZipOutputStream zos;
  
          public ZipRecordWriter(FSDataOutputStream os) {
              zos = new ZipOutputStream(os);
          }
  
          @Override
          public void write(NullWritable key, Text value) throws IOException,
                  InterruptedException {
              // TODO: create new ZipEntry &amp; add to the ZipOutputStream (zos)
          }
  
          @Override
          public void close(TaskAttemptContext context) throws IOException,
                  InterruptedException {
              zos.close();
          }
      }
  }
  </code></pre>
  
  <p>I am not getting any error but my output in still in r-000001 format .</p>
  
  <p>Am i missing any configuration here ?</p>