public static CompressionCodecName getParquetCompressionCodec(Configuration configuration) {
return CompressionCodecName.fromConf(configuration.get(ParquetOutputFormat.COMPRESSION, UNCOMPRESSED.name()));
}
public CompressionCodecName getCodec() {
CompressionCodecName codec;
Configuration configuration = getConfiguration();
if (isParquetCompressionSet(configuration)) { // explicit parquet config
codec = getParquetCompressionCodec(configuration);
} else if (isHadoopCompressionSet()) { // from hadoop config
codec = getHadoopCompressionCodec();
} else {
if (INFO) LOG.info("Compression set to false");
codec = CompressionCodecName.UNCOMPRESSED;
}
if (INFO) LOG.info("Compression: " + codec.name());
return codec;
}