Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive

hive:

default> select distinct order_status from dwd.fact_order_master
[2022-10-11 13:50:21] [08S01][2] Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

在这里插入图片描述
在这里插入图片描述

Diagnostics:	
Application application_1665474430718_0005 failed 2 times due to AM Container for appattempt_1665474430718_0005_000002 exited with exitCode: 1
Failing this attempt.Diagnostics: [2022-10-11 16:31:55.292]Exception from container-launch.
Container id: container_1665474430718_0005_02_000001
Exit code: 1
[2022-10-11 16:31:55.295]Container exited with a non-zero exit code 1. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster
Please check whether your etc/hadoop/mapred-site.xml contains the below configuration:
<property>
<name>yarn.app.mapreduce.am.env</name>
<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
</property>
<property>
<name>mapreduce.map.env</name>
<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
</property>
<property>
<name>mapreduce.reduce.env</name>
<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
</property>
[2022-10-11 16:31:55.295]Container exited with a non-zero exit code 1. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster
Please check whether your etc/hadoop/mapred-site.xml contains the below configuration:
<property>
<name>yarn.app.mapreduce.am.env</name>
<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
</property>
<property>
<name>mapreduce.map.env</name>
<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
</property>
<property>
<name>mapreduce.reduce.env</name>
<value>HADOOP_MAPRED_HOME=${full path of your hadoop distribution directory}</value>
</property>
For more detailed output, check the application tracking page: http://bigdata2:8088/cluster/app/application_1665474430718_0005 Then click on links to logs of each attempt.
. Failing the application.

解决过程:

检查mapred-site.xml是否配置以下内容:(我已配置,且环境变量中也已经有${HADOOP_HOME})

    <property>
	   <name>yarn.app.mapreduce.am.env</name>
	   <value>HADOOP_MAPRED_HOME=${HADOOP_HOME}</value>
	 </property>
	 <property>
	   <name>mapreduce.map.env</name>
	   <value>HADOOP_MAPRED_HOME=${HADOOP_HOME}</value>
	 </property>
	 <property>
	   <name>mapreduce.reduce.env</name>
	   <value>HADOOP_MAPRED_HOME=${HADOOP_HOME}</value>
	 </property>

解决:

将${HADOOP_HOME}换成所在路径。

    <property>
           <name>yarn.app.mapreduce.am.env</name>
           <value>HADOOP_MAPRED_HOME=/opt/module/hadoop-3.1.3</value>
         </property>
         <property>
           <name>mapreduce.map.env</name>
           <value>HADOOP_MAPRED_HOME=/opt/module/hadoop-3.1.3</value>
         </property>
         <property>
           <name>mapreduce.reduce.env</name>
           <value>HADOOP_MAPRED_HOME=/opt/module/hadoop-3.1.3</value>
         </property>
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
引用\[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 ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值