oozie调度hive脚本时报Main class [org.apache.oozie.action.hadoop.HiveMain], exit code [40000]

本文档记录了在使用oozie调度hive脚本时遇到的问题,即出现错误提示'Main class [org.apache.oozie.action.hadoop.HiveMain], exit code [40000]'。作者通过分析job.properties、workflow.xml和hive脚本,发现是由于hive脚本中的语法错误导致。在修正了hive脚本的insert语句为load data命令后,问题得到解决。建议在排查oozie执行失败时,不仅查看oozie日志,还应检查hive的日志信息以获取更详细的错误原因。" 101607076,8846151,知识图谱在金融风控中的应用详解,"['大数据', '人工智能', '数据库', '知识图谱', '风控']
摘要由CSDN通过智能技术生成

刚安装配置好oozie服务,测试以下的oozie调度hive脚本加载数据到表里面,报Main class [org.apache.oozie.action.hadoop.HiveMain], exit code [40000],根据以下脚本及执行步骤分析问题及解决问题。

1、job.properties脚本:
nameNode=hdfs://192.168.240.138:8020
jobTracker=192.168.240.138:8032
queueName=default
examplesRoot=user/root/oozie/hive/hive_action

oozie.use.system.libpath=true
oozie.wf.application.path=${nameNode}/${examplesRoot}/workflow.xml

2、workflow.xml脚本:

${jobTracker} ${nameNode} oozie.hive.defaults hive-site.xml hive.metastore.local false hive.metastore.uris thrift://192.168.240.138:9083 hive.metastore.warehouse.dir /user/hive/warehouse script failed, error message:${wf:errorMessage(wf:lastErrorNode())}

3、hive的脚本insert.sql:
insert into student(id,name) values(1,‘zhangsan’);

4、上传到hdfs并执行命令:
oozie job -oozie http://hadoop05:11000/oozie -config ./job.properties -run

引用\[1\]:Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Exception when loading 1 in table uniaction1 with loadPath=********************************* 。 引用\[2\]:Error while processing statement: FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Ensure called on an unitialized (or closed) session 352a2d91-16c8-44bd-a296-8a8eab91a2d0 。 引用\[3\]:ERROR : FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask INFO : Completed executing command(queryId=hive_20221018074224_172b6c79-9a2b-4af0-a992-b6db1380daf2); Time taken: 5.112 seconds Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask (state=08S01,code=1) Intercepting System.exit(2) Failing Oozie Launcher, Main class \[org.apache.oozie.action.hadoop.Hive2Main\], exit code \[2\] 。 问题: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 回答: 根据提供的引用内容,没有找到关于"Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask"的具体信息。请提供更多的上下文或详细描述,以便我能够更好地回答您的问题。 #### 引用[.reference_title] - *1* *2* *3* [hive报错信息不明确的情况汇总](https://blog.csdn.net/Direction_Wind/article/details/126001680)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值