sqoop1.4.7报ERROR hive.HiveConfig: Could not load org.apache.hadoop.hive.conf.HiveConf.

使用sqoop从mysql向hive中导入数据报错如下:
20/07/18 04:13:38 ERROR hive.HiveConfig: Could not load org.apache.hadoop.hive.conf.HiveConf. Make sure HIVE_CONF_DIR is set correctly.
20/07/18 04:13:38 ERROR tool.ImportTool: Import failed: java.io.IOException: java.lang.ClassNotFoundException: org.apache.hadoop.hive.conf.HiveConf
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.conf.HiveConf

sqoop1.4.7报ERROR hive.HiveConfig: Could not load org.apache.hadoop.hive.conf.HiveConf._第1张图片
报错原因:sqoop缺少了hive的依赖包
解决办法:
进入到hive的lib下,首先拷贝所有的hive开头的包到sqoop的lib下,再拷贝jline-2.12.jar这个jar包到sqoop的lib下,这样就搞定了,执行把数据导入到hive中就不会报错了

[hadoop@hrbu30 lib]$ cp /opt/wdp/hive/lib/hive* /opt/wdp/sqoop/lib/
[hadoop@hrbu30 lib]$ cp /opt/wdp/hive/lib/jline-2.12.jar /opt/wdp/sqoop/lib/

你可能感兴趣的:(Sqoop,sqoop,hive,hadoop,大数据,mapreduce)