@@ -0,0 +1,3252 @@
+package parquet.hadoop.mapred;%0A%0Aimport static parquet.Log.INFO;%0Aimport parquet.Log;%0Aimport parquet.hadoop.ParquetOutputFormat;%0Aimport parquet.hadoop.ParquetRecordWriter;%0Aimport parquet.hadoop.metadata.CompressionCodecName;%0A%0Aimport java.io.IOException;%0A%0Aimport org.apache.hadoop.fs.FileSystem;%0Aimport org.apache.hadoop.fs.Path;%0Aimport org.apache.hadoop.io.compress.DefaultCodec;%0Aimport org.apache.hadoop.mapred.JobConf;%0Aimport org.apache.hadoop.mapred.RecordWriter;%0Aimport org.apache.hadoop.mapred.Reporter;%0Aimport org.apache.hadoop.util.Progressable;%0A%0A@SuppressWarnings(%22deprecation%22)%0Apublic class DeprecatedParquetOutputFormat%3CV%3E extends org.apache.hadoop.mapred.FileOutputFormat%3CVoid, V%3E %7B%0A  private static final Log LOG = Log.getLog(ParquetOutputFormat.class);%0A%0A  protected ParquetOutputFormat%3CV%3E realOutputFormat = new ParquetOutputFormat%3CV%3E();%0A%0A  @Override%0A  public RecordWriter%3CVoid, V%3E getRecordWriter(FileSystem fs,%0A      JobConf conf, String name, Progressable progress) throws IOException %7B%0A    return new RecordWriterWrapper%3CV%3E(realOutputFormat, fs, conf, name, progress);%0A  %7D%0A%0A  private static CompressionCodecName getCodec(JobConf conf) %7B%0A    CompressionCodecName codec;%0A%0A    if (ParquetOutputFormat.isCompressionSet(conf)) %7B // explicit parquet config%0A      codec = ParquetOutputFormat.getCompression(conf);%0A    %7D else if (getCompressOutput(conf)) %7B // from hadoop config%0A      // find the right codec%0A      Class%3C?%3E codecClass = getOutputCompressorClass(conf, DefaultCodec.class);%0A      if (INFO) LOG.info(%22Compression set through hadoop codec: %22 + codecClass.getName());%0A      codec = CompressionCodecName.fromCompressionCodec(codecClass);%0A    %7D else %7B%0A      if (INFO) LOG.info(%22Compression set to false%22);%0A      codec = CompressionCodecName.UNCOMPRESSED;%0A    %7D%0A%0A    if (INFO) LOG.info(%22Compression: %22 + codec.name());%0A    return codec;%0A  %7D%0A%0A  private static Path getDefaultWorkFile(JobConf conf, String name, String extension) %7B%0A    String file = getUniqueName(conf, name) + extension;%0A    return new Path(getWorkOutputPath(conf), file);%0A  %7D%0A%0A  private static class RecordWriterWrapper%3CV%3E implements RecordWriter%3CVoid, V%3E %7B%0A%0A    private ParquetRecordWriter%3CV%3E realWriter;%0A%0A    public RecordWriterWrapper(ParquetOutputFormat%3CV%3E realOutputFormat,%0A        FileSystem fs, JobConf conf, String name, Progressable progress) throws IOException %7B%0A%0A      CompressionCodecName codec = getCodec(conf);%0A      String extension = codec.getExtension() + %22.parquet%22;%0A      Path file = getDefaultWorkFile(conf, name, extension);%0A%0A      try %7B%0A        realWriter = (ParquetRecordWriter%3CV%3E) realOutputFormat.getRecordWriter(conf, file, codec);%0A      %7D catch (InterruptedException e) %7B%0A        Thread.interrupted();%0A        throw new IOException(e);%0A      %7D%0A    %7D%0A%0A    @Override%0A    public void close(Reporter reporter) throws IOException %7B%0A      try %7B%0A        realWriter.close(null);%0A      %7D catch (InterruptedException e) %7B%0A        Thread.interrupted();%0A        throw new IOException(e);%0A      %7D%0A    %7D%0A%0A    @Override%0A    public void write(Void key, V value) throws IOException %7B%0A      try %7B%0A        realWriter.write(key, value);%0A      %7D catch (InterruptedException e) %7B%0A        Thread.interrupted();%0A        throw new IOException(e);%0A      %7D%0A    %7D%0A  %7D%0A%7D%0A

add a DeprecatedParquetOutputFormat to mirror DeprecatedParquetInputFormat