FileSystem fs = path.getFileSystem(conf);
CompressionCodec codec = new CompressionCodecFactory(conf).getCodec(path);
OutputStream output;
if (codec != null) {
compressor = CodecPool.getCompressor(codec);
output = codec.createOutputStream(fs.create(path), compressor);
} else {
output = fs.create(path);
}
writer = new JsonObjectMapperWriter<T>(output,
conf.getBoolean("rumen.output.pretty.print", true));