mirror of
https://github.com/apache/sqoop.git
synced 2025-05-04 06:22:46 +08:00
SQOOP-340. Explicit error message for invalid options.
(Jarek Jarcec Cecho via Arvind Prabhakar) git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1173304 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c2c4e24a1f
commit
cad898768b
@ -822,6 +822,13 @@ protected void validateImportOptions(SqoopOptions options)
|
|||||||
throw new InvalidOptionsException(
|
throw new InvalidOptionsException(
|
||||||
"When importing query results in parallel, you must specify --"
|
"When importing query results in parallel, you must specify --"
|
||||||
+ SPLIT_BY_ARG + "." + HELP_STR);
|
+ SPLIT_BY_ARG + "." + HELP_STR);
|
||||||
|
} else if (options.isDirect()
|
||||||
|
&& options.getFileLayout() != SqoopOptions.FileLayout.TextFile
|
||||||
|
&& options.getConnectString().contains("jdbc:mysql://")) {
|
||||||
|
throw new InvalidOptionsException(
|
||||||
|
"MySQL direct export currently supports only text output format."
|
||||||
|
+ "Parameters --as-sequencefile and --as-avrodatafile are not "
|
||||||
|
+ "supported with --direct params in MySQL case.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user