5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-03 05:31:14 +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:
Arvind Prabhakar 2011-09-20 18:53:10 +00:00
parent c2c4e24a1f
commit cad898768b

View File

@ -822,6 +822,13 @@ protected void validateImportOptions(SqoopOptions options)
throw new InvalidOptionsException(
"When importing query results in parallel, you must specify --"
+ 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.");
}
}