简体   繁体   English

失败:执行错误,在Hive中进行联接操作期间,从org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask​​返回代码2

[英]FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask during join operation in hive

I am trying to run the join query in hive on the following two tables- 我正在尝试在以下两个表中的配置单元中运行联接查询-

select b.location from user_activity_rule a inner join user_info_rule b where a.uid=b.uid and a.cancellation=true;

Query ID = username_20180530154141_0a187506-7aca-442a-8310-582d335ad78d
Total jobs = 1
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; support was removed in 8.0
Execution log at: /tmp/username/username_20180530154141_0a187506-7aca-442a-8310-582d335ad78d.log
2018-05-30 03:41:51     Starting to launch local task to process map join;      maximum memory = 2058354688
Execution failed with exit status: 2
Obtaining error information

Task failed!
Task ID:
  Stage-4

Logs:

/tmp/username/hive.log
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask

What does this error mean and how to resolve this? 此错误是什么意思,如何解决?

This happens when the job you are trying to run runs out of memory. 当您尝试运行的作业内存不足时,就会发生这种情况。 one way of overcoming this is to use this command: 解决此问题的一种方法是使用以下命令:

set hive.auto.convert.join = false;

This will help in join optimization. 这将有助于联接优化。

Sometimes when the number of concurrent users using it is high(at some peak time), this happens. 有时,当使用并发用户的数量很高时(在某个高峰时间),就会发生这种情况。 Alternatively, you can fire this query when not many users are using it. 或者,您可以在没有多少用户使用该查询时触发该查询。 Apparently, there would be much free memory so that your job can consume required. 显然,会有很多可用内存,以便您的工作可以消耗所需的时间。 This alternative can be adopted when nodes are less in Dev environment and you are sure that there will be no memory issues in production. 当开发环境中的节点较少且您确定生产中不会出现内存问题时,可以采用此替代方法。

除了在哪里可以使用以下代码,然后尝试

SELECT b.location FROM user_activity_rule a JOIN user_info_rule b ON(a.uid=b.uid) WHERE a.cancellation="true";

First of all, make sure the HADOOP_USER that you used to run SQL can run MapReduce . 首先,确保用于运行SQL的HADOOP_USER可以运行MapReduce

Then, use SQL like following: 然后,像下面这样使用SQL:

set hive.auto.convert.join = false;
select b.location 
from user_activity_rule a 
inner join user_info_rule b 
where a.uid=b.uid and a.cancellation=true;

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 失败:执行错误,从 org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask​​ 返回代码 1 - FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask Hive:失败:执行错误,从org.apache.hadoop.hive.ql.exec.mr.MapRedTask返回代码2 - Hive : FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask Cloudera Hive:失败:执行错误,从org.apache.hadoop.hive.ql.exec.mr.MapRedTask MapReduce返回代码2 - Cloudera Hive: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask MapReduce Hive 错误:失败:执行错误,从 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 返回代码 2 - Hive Error : FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 执行错误,从 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 返回代码 2 - Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask Hive Error on windows - return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask - Hive Error on windows - return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 来自 org.apache.hadoop.hive.ql.exec.mapredtask 的配置单元执行错误返回代码 2 失败 - hive failed execution error return code 2 from org.apache.hadoop.hive.ql.exec.mapredtask 错误ql.Driver(SessionState.java:printError(419))-失败:执行错误,从org.apache.hadoop.hive.ql.exec.mr.MapRedTask返回代码-101 - ERROR ql.Driver (SessionState.java:printError(419)) - FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 失败:执行错误,在访问 Hive 视图时从 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 异常返回代码 2 - Getting FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask exception while access Hive views 执行错误,从 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 返回代码 1 (state=08S01,code=1) - Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask (state=08S01,code=1)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM