在尝试使用sqoop从MySQL向hive导入数据时遇到了'Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hive/shims/ShimLoader'错误。要解决这个问题,可能需要检查和更新Hadoop、Hive和sqoop的相关依赖,确保它们的版本兼容,并且所有必需的jar包已经正确地添加到类路径中。
摘要由CSDN通过智能技术生成
用sqoop从MySQL把数据导到hive,报错:
19/12/09 02:06:19 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `student` AS t LIMIT 1
19/12/09 02:06:19 INFO hive.HiveImport: Loading uploaded data into Hive
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hive/shims/ShimLoader
at org.apache.hadoop.hive.conf.HiveConf$ConfVars.<clinit>(HiveConf.java:368)
at org.apache.hadoop.hive.conf.HiveConf.<clinit>(HiveConf.java:105)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.sqoop.hive.HiveConfig.getHiveConf(HiveConfig.java:44)
at org.apache.sqoop.hive.HiveImport.getHiveArgs(HiveImport.java:392)
at org.apache.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:379)
at org.apache.sqoop.hive.HiveImport.executeScript(HiveImport.java:337)
at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:241)
at
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hive/shims/ShimLoader
用sqoop从MySQL把数据导到hive,报错:19/12/09 02:06:19 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `student` AS t LIMIT 119/12/09 02:06:19 INFO hive.HiveImport: Loading uploaded data into ...