if (compressionType == CompressionType.NONE) {
writer = new Writer(fs, conf, name, keyClass, valClass, progress, new Metadata());
} else if (compressionType == CompressionType.RECORD) {
writer = new RecordCompressWriter(fs, conf, name,
keyClass, valClass, new DefaultCodec(), progress, new Metadata());
} else if (compressionType == CompressionType.BLOCK){
writer = new BlockCompressWriter(fs, conf, name,
keyClass, valClass, new DefaultCodec(), progress, new Metadata());
}
return writer;
}