5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-03 06:09:47 +08:00

SQOOP-1052: Hive import is not compatible with Avro and SequenceFile but no errors are thrown

(Jarek Jarcec Cecho via Kate Ting)
This commit is contained in:
Kate Ting 2013-05-23 18:54:23 -04:00
parent b2d3a682ad
commit b07906a2a2

View File

@ -1050,6 +1050,18 @@ protected void validateHiveOptions(SqoopOptions options)
+ " option." + HELP_STR);
}
if(options.doHiveImport()
&& options.getFileLayout() == SqoopOptions.FileLayout.AvroDataFile) {
throw new InvalidOptionsException("Hive import is not compatible with "
+ "importing into AVRO format.");
}
if(options.doHiveImport()
&& options.getFileLayout() == SqoopOptions.FileLayout.SequenceFile) {
throw new InvalidOptionsException("Hive import is not compatible with "
+ "importing into SequenceFile format.");
}
// Many users are reporting issues when they are trying to import data
// directly into hive warehouse. This should prevent users from doing
// so in case of a default location.