欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

CDH海豚调度器Error:Couldnotfindorloadmainclassorg.apache.sqoop.Sqoop

时间:2023-04-18

1.海豚执行如下shell脚本

${SQOOP_HOME}/bin/sqoop version

报错信息:

Error: Could not find or load main class org.apache.sqoop.Sqoop

2.我在命令行 /opt/cloudera/parcels/CDH/lib/sqoop/bin 目录下执行报错找不到JAVA_HOME

./sqoop version

3.我在命令行 /opt/cloudera/parcels/CDH/bin 目录下执行可以正常执行

./sqoop version

4.于是修改了/opt/cloudera/parcels/CDH/etc/sqoop/conf.dist 与 /opt/cloudera/parcels/CDH/lib/sqoop/conf 目录下的sqoop_env.sh 文件 添加如下配置

export HADOOP_COMMON_HOME=/opt/cloudera/parcels/CDH/lib/hadoopexport HADOOP_MAPRED_HOME=/opt/cloudera/parcels/CDH/lib/hadoop-mapreduceexport HIVE_HOME=/opt/cloudera/parcels/CDH/lib/hiveexport ZOOKEEPER_HOME=/opt/cloudera/parcels/CDH/lib/zookeeperexport ZOOCFGDIR=/opt/cloudera/parcels/CDH/lib/zookeeper/confexport JAVA_HOME=/usr/local/jdk1.8.0_152

5.而后步骤2可以正常执行

然后修改海豚的dolphinscheduler_env.sh 的文件

export HADOOP_HOME=/opt/cloudera/parcels/CDH/lib/hadoopexport HADOOP_CONF_DIR=/etc/hadoop/confexport SQOOP_HOME=/opt/cloudera/parcels/CDH/lib/sqoopexport HADOOP_CLASSPATH=$HADOOP_CLASSPATH::export HADOOP_COMMON_HOME=/opt/cloudera/parcels/CDH/lib/hadoopexport HADOOP_MAPRED_HOME=/opt/cloudera/parcels/CDH/lib/hadoop-mapreduceexport HIVE_HOME=/opt/cloudera/parcels/CDH/lib/hiveexport ZOOKEEPER_HOME=/opt/cloudera/parcels/CDH/lib/zookeeperexport ZOOCFGDIR=/opt/cloudera/parcels/CDH/lib/zookeeper/confexport JAVA_HOME=/usr/local/jdk1.8.0_152

6.海豚就可以正常使用到sqoop命令了

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。