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