栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

azkaban调度任务的时候报错:hive: command not found

azkaban调度任务的时候报错:hive: command not found

azkaban调度任务的时候报错:hive: command not found,具体错误如下:

27-12-2021 15:06:26 CST hdfs_to_ods_log INFO - ================== 日志日期为 2021-12-25 ==================
27-12-2021 15:06:26 CST hdfs_to_ods_log INFO - /home/test/bin/hdfs_to_ods_log.sh: line 18: hive: command not found
27-12-2021 15:06:26 CST hdfs_to_ods_log INFO - Process with id 27540 completed unsuccessfully in 0 seconds.
27-12-2021 15:06:26 CST hdfs_to_ods_log ERROR - Job run failed!
java.lang.RuntimeException: azkaban.jobExecutor.utils.process.ProcessFailureException: Process exited with code 127
	at azkaban.jobExecutor.ProcessJob.run(ProcessJob.java:312)
	at azkaban.execapp.JobRunner.runJob(JobRunner.java:823)
	at azkaban.execapp.JobRunner.doRun(JobRunner.java:602)
	at azkaban.execapp.JobRunner.run(JobRunner.java:563)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: azkaban.jobExecutor.utils.process.ProcessFailureException: Process exited with code 127
	at azkaban.jobExecutor.utils.process.AzkabanProcess.run(AzkabanProcess.java:125)
	at azkaban.jobExecutor.ProcessJob.run(ProcessJob.java:304)
	... 8 more

原因是:

即便hive的环境变量已经设置成功,但是crontab中执行代码时,并不会解析到环境变量,需要在hive的安装目录下执行脚本,或者在shell脚本代码中配置定向到hive的安装路径下执行,在上边代码前面加上“source /etc/profile”和“locate /bin/hive”
 

修改后如下:

在执行的azkaban的xxx.sh文件前加

source /etc/profile
locate /opt/intall/hive

问题解决!!!!

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/680986.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号