mirror of
https://github.com/apache/sqoop.git
synced 2025-05-03 21:00:13 +08:00
SQOOP-1508: Add warning when using unsupported compression codec
(Qian Xu via Jarek Jarcec Cecho)
This commit is contained in:
parent
268299ee52
commit
57336d7f53
@ -140,6 +140,18 @@ protected void configureOutputFormat(Job job, String tableName,
|
||||
.set(AvroJob.OUTPUT_CODEC, DataFileConstants.DEFLATE_CODEC);
|
||||
}
|
||||
}
|
||||
|
||||
if (options.getFileLayout() == SqoopOptions.FileLayout.ParquetFile) {
|
||||
if (codecName != null) {
|
||||
Configuration conf = job.getConfiguration();
|
||||
String shortName = CodecMap.getCodecShortNameByName(codecName, conf);
|
||||
if (!shortName.equalsIgnoreCase("default") &&
|
||||
!shortName.equalsIgnoreCase("snappy")) {
|
||||
// TODO: SQOOP-1391 More compression codec support
|
||||
LOG.warn("Will use snappy as compression codec instead");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Path outputPath = context.getDestination();
|
||||
|
Loading…
Reference in New Issue
Block a user