sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arv...@apache.org
Subject svn commit: r1173304 - /incubator/sqoop/trunk/src/java/com/cloudera/sqoop/tool/ImportTool.java
Date Tue, 20 Sep 2011 18:53:10 GMT
Author: arvind
Date: Tue Sep 20 18:53:10 2011
New Revision: 1173304

URL: http://svn.apache.org/viewvc?rev=1173304&view=rev
Log:
SQOOP-340. Explicit error message for invalid options.

(Jarek Jarcec Cecho via Arvind Prabhakar)

Modified:
    incubator/sqoop/trunk/src/java/com/cloudera/sqoop/tool/ImportTool.java

Modified: incubator/sqoop/trunk/src/java/com/cloudera/sqoop/tool/ImportTool.java
URL: http://svn.apache.org/viewvc/incubator/sqoop/trunk/src/java/com/cloudera/sqoop/tool/ImportTool.java?rev=1173304&r1=1173303&r2=1173304&view=diff
==============================================================================
--- incubator/sqoop/trunk/src/java/com/cloudera/sqoop/tool/ImportTool.java (original)
+++ incubator/sqoop/trunk/src/java/com/cloudera/sqoop/tool/ImportTool.java Tue Sep 20 18:53:10
2011
@@ -822,6 +822,13 @@ public class ImportTool extends BaseSqoo
       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.");
     }
   }
 



Mime
View raw message