什么是 Hive:从 org.apache.hadoop.hive.ql.exec.MapRedTask 返回代码 2 [英] What is Hive: Return Code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask

查看:27
本文介绍了什么是 Hive:从 org.apache.hadoop.hive.ql.exec.MapRedTask 返回代码 2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到:

FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask

尝试使用 hive 控制台中的命令制作分区表的副本​​时:

While trying to make a copy of a partitioned table using the commands in the hive console:

CREATE TABLE copy_table_name LIKE table_name;
INSERT OVERWRITE TABLE copy_table_name PARTITION(day) SELECT * FROM table_name;

我最初遇到了一些语义分析错误,不得不设置:

I initially got some semantic analysis errors and had to set:

set hive.exec.dynamic.partition=true
set hive.exec.dynamic.partition.mode=nonstrict

虽然我不确定上面的属性有什么作用?

Although I'm not sure what the above properties do?

来自 hive 控制台的完整输出:

Full ouput from hive console:

Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks determined at compile time: 1
In order to change the average load for a reducer (in bytes):
  set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
  set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
  set mapred.reduce.tasks=<number>
Starting Job = job_201206191101_4557, Tracking URL = http://jobtracker:50030/jobdetails.jsp?jobid=job_201206191101_4557
Kill Command = /usr/lib/hadoop/bin/hadoop job  -Dmapred.job.tracker=master:8021 -kill job_201206191101_4557
2012-06-25 09:53:05,826 Stage-1 map = 0%,  reduce = 0%
2012-06-25 09:53:53,044 Stage-1 map = 100%,  reduce = 100%
Ended Job = job_201206191101_4557 with errors
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask

推荐答案

这不是真正的错误,这里是如何找到它:

That's not the real error, here's how to find it:

转到 hadoop jobtracker web-dashboard,找到失败的 hive mapreduce 作业并查看失败任务的日志.这将显示真正的错误.

Go to the hadoop jobtracker web-dashboard, find the hive mapreduce jobs that failed and look at the logs of the failed tasks. That will show you the real error.

控制台输出错误没有用,主要是因为它没有查看单个作业/任务的视图来提取真正的错误(多个任务中可能存在错误)

The console output errors are useless, largely beause it doesn't have a view of the individual jobs/tasks to pull the real errors (there could be errors in multiple tasks)

希望有所帮助.

这篇关于什么是 Hive:从 org.apache.hadoop.hive.ql.exec.MapRedTask 返回代码 2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆