From 3baa7430c6fcac8d0847aaa0c49fead4fadce372 Mon Sep 17 00:00:00 2001 From: slee Date: Fri, 28 Aug 2015 15:44:50 +0800 Subject: [PATCH] fix the problem of NoClassDefFoundError of HiveOutputFormat when import or export to hive through kite connector --- .../org/apache/sqoop/connector/kite/KiteFromInitializer.java | 1 + .../java/org/apache/sqoop/connector/kite/KiteToInitializer.java | 1 + 2 files changed, 2 insertions(+) diff --git a/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteFromInitializer.java b/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteFromInitializer.java index 28c5bac2..c590b8e9 100644 --- a/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteFromInitializer.java +++ b/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteFromInitializer.java @@ -71,6 +71,7 @@ public Set getJars(InitializerContext context, if (fromJobConfig.fromJobConfig.uri.startsWith("dataset:hive")) { // @TODO(Abe): Remove a deps that aren't used? jars.add(ClassUtils.jarForClass("org.apache.hadoop.hive.conf.HiveConf")); + jars.add(ClassUtils.jarForClass("org.apache.hadoop.hive.ql.io.HiveOutputFormat")); jars.add(ClassUtils.jarForClass("org.apache.hadoop.hive.serde2.SerDe")); jars.add(ClassUtils.jarForClass("org.kitesdk.data.spi.hive.MetaStoreUtil")); jars.add(ClassUtils.jarForClass("org.kitesdk.compat.DynConstructors")); diff --git a/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteToInitializer.java b/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteToInitializer.java index 50daba08..df8bd544 100644 --- a/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteToInitializer.java +++ b/connector/connector-kite/src/main/java/org/apache/sqoop/connector/kite/KiteToInitializer.java @@ -78,6 +78,7 @@ public Set getJars(InitializerContext context, if (toJobConfig.toJobConfig.uri.startsWith("dataset:hive")) { // @TODO(Abe): Remove a deps that aren't used? jars.add(ClassUtils.jarForClass("org.apache.hadoop.hive.conf.HiveConf")); + jars.add(ClassUtils.jarForClass("org.apache.hadoop.hive.ql.io.HiveOutputFormat")); jars.add(ClassUtils.jarForClass("org.apache.hadoop.hive.serde2.SerDe")); jars.add(ClassUtils.jarForClass("org.kitesdk.data.spi.hive.MetaStoreUtil")); jars.add(ClassUtils.jarForClass("org.kitesdk.compat.DynConstructors"));