问题描述
我得到:
FAILED:执行错误,从org.apache.hadoop.hive.ql返回代码2。 exec.MapRedTask
尝试使用hive控制台中的命令复制分区表时:
CREATE TABLE copy_table_name LIKE table_name;
INSERT OVERWRITE TABLE copy_table_name PARTITION(day)SELECT * FROM table_name;
我最初得到了一些语义分析错误,必须设置:
set hive.exec.dynamic.partition = true
set hive.exec.dynamic.partition.mode = nonstrict
尽管我不确定上述属性的作用是什么?
完全从hive控制台输出:
总MapReduce作业= 1
启动Job 1中的1
在编译时确定的reduce任务的数量:1
为了改变reducer的平均负载(以字节为单位):
set hive。 exec.reducers.bytes.per.reducer = LT;数>
为了限制还原器的最大数量:
set hive.exec.reducers.max =< number>
为了设置一个固定数量的简化器:
set mapred.reduce.tasks =< number>
开始作业= job_201206191101_4557,跟踪URL = http:// jobtracker:50030 / jobdetails.jsp?jobid = job_201206191101_4557
Kill Command = / usr / lib / hadoop / bin / hadoop作业-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错误
FAILED:执行错误,从org.apache.hadoop.hive.ql.exec.MapRedTask返回代码2
这不是真正的错误,下面是如何找到它:
转到hadoop jobtracker web-dashboard,找到失败的配置单元mapreduce作业并查看失败任务的日志。这会向您显示真实错误。
控制台输出错误是无用的,主要是因为它没有单个作业/任务的视图来拉取真正的错误(在多个任务中可能存在错误)
希望有帮助。
I am getting:
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask
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?
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:
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)
Hope that helps.
这篇关于什么是Hive:从org.apache.hadoop.hive.ql.exec.MapRedTask返回代码2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!