mirror of
https://github.com/apache/sqoop.git
synced 2025-05-02 19:19:38 +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:
parent
b2d3a682ad
commit
b07906a2a2
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user