执行以下语句时,报错:
sqoop create-hive-table --connect jdbc:mysql://master:3306/simon --username root --password root --table table_act --hive-table table_act_sqoop
错误日志:
19/05/12 18:25:09 ERROR hive.HiveConfig: Could not load org.apache.hadoop.hive.conf.HiveConf. Make sure HIVE_CONF_DIR is set correctly.
19/05/12 18:25:09 ERROR tool.CreateHiveTableTool: Encountered IOException running create table job: java.io.IOException: java.lang.ClassNotFoundException: org.apache.hadoop.hive.conf.HiveConf
原因分析:
Could not load org.apache.hadoop.hive.conf.HiveConf. Make sure HIVE_CONF_DIR is set correctly.
找不到 HiveConf ???
解决方案:
cp $HIVE_HOME/lib/hive-exec-1.2.2.jar $SQOOP_HOME/lib/
把hive的lib文件夹下面的hive-exec-1.2.2.jar 拷贝到sqoop的lib目录下就可以了
网友评论