You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sqoop.apache.org by ka...@apache.org on 2013/05/24 00:57:37 UTC

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

Updated Branches:
  refs/heads/trunk b2d3a682a -> b07906a2a


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

(Jarek Jarcec Cecho via Kate Ting)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/b07906a2
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/b07906a2
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/b07906a2

Branch: refs/heads/trunk
Commit: b07906a2a2fc9c5d2808cb53acf1e855cfef0314
Parents: b2d3a68
Author: Kate Ting <ka...@apache.org>
Authored: Thu May 23 18:54:23 2013 -0400
Committer: Kate Ting <ka...@apache.org>
Committed: Thu May 23 18:54:23 2013 -0400

----------------------------------------------------------------------
 src/java/org/apache/sqoop/tool/BaseSqoopTool.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/b07906a2/src/java/org/apache/sqoop/tool/BaseSqoopTool.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/sqoop/tool/BaseSqoopTool.java b/src/java/org/apache/sqoop/tool/BaseSqoopTool.java
index 9417d57..42f521f 100644
--- a/src/java/org/apache/sqoop/tool/BaseSqoopTool.java
+++ b/src/java/org/apache/sqoop/tool/BaseSqoopTool.java
@@ -1050,6 +1050,18 @@ public abstract class BaseSqoopTool extends com.cloudera.sqoop.tool.SqoopTool {
               + " 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.