使用hive报 return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask解决方法

当我使用hive进行如下查询时

 select * from t_t inner join t_te on t_t.id=t_te.id;

出现如下错误:

Query ID = root_20180410193117_e9d36b57-54ce-4ad5-a48c-df876f449de1
Total jobs = 1
18/04/10 19:31:20 WARN conf.Configuration: file:/tmp/root/38c7c621-d0b0-4c5a-9349-4c1cee8b7304/hive_2018-04-10_19-31-17_704_2287968297713327096-1/-local-10006/jobconf.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval;  Ignoring.
18/04/10 19:31:20 WARN conf.Configuration: file:/tmp/root/38c7c621-d0b0-4c5a-9349-4c1cee8b7304/hive_2018-04-10_19-31-17_704_2287968297713327096-1/-local-10006/jobconf.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts;  Ignoring.
Execution log at: /tmp/root/root_20180410193117_e9d36b57-54ce-4ad5-a48c-df876f449de1.log
2018-04-10 19:31:21     Starting to launch local task to process map join;      maximum memory = 518979584
2018-04-10 19:31:22     Dump the side-table for tag: 1 with group count: 8 into file: file:/tmp/root/38c7c621-d0b0-4c5a-9349-4c1cee8b7304/hive_2018-04-10_19-31-17_704_2287968297713327096-1/-local-10003/HashTable-Stage-3/MapJoin-mapfile31--.hashtable
2018-04-10 19:31:22     Uploaded 1 File to: file:/tmp/root/38c7c621-d0b0-4c5a-9349-4c1cee8b7304/hive_2018-04-10_19-31-17_704_2287968297713327096-1/-local-10003/HashTable-Stage-3/MapJoin-mapfile31--.hashtable (460 bytes)
2018-04-10 19:31:22     End of local task; Time Taken: 1.616 sec.
Execution completed successfully
MapredLocal task succeeded
Launching Job 1 out of 1
Number of reduce tasks is set to 0 since there's no reduce operator
Starting Job = job_1523358995758_0004, Tracking URL = http://shizhan:8088/proxy/application_1523358995758_0004/
Kill Command = /home/soft/hadoop-2.4.1/bin/hadoop job  -kill job_1523358995758_0004
Hadoop job information for Stage-3: number of mappers: 0; number of reducers: 0
2018-04-10 19:31:25,622 Stage-3 map = 0%,  reduce = 0%
Ended Job = job_1523358995758_0004 with errors
Error during job, obtaining debugging information...
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
MapReduce Jobs Launched: 
Stage-Stage-3:  HDFS Read: 0 HDFS Write: 0 FAIL
Total MapReduce CPU Time Spent: 0 msec

解决方法是我的四台服务器时间不同步,使用date -s 16:58:20进行同步,注意我下图标黄的地方,是一下让四台服务器同步

使用hive报 return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask解决方法_第1张图片

然后再运行上面的查询语句:

select * from t_t inner join t_te on t_t.id=t_te.id;

结果如下:

使用hive报 return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask解决方法_第2张图片

则成功了

你可能感兴趣的:(hive)