I have deployed a CDH-5.9 cluster with MR as hive execution engine. I have a hive table named "users" with 50 rows. Whenever I execute the query select * from users
works fine as follows :
hive> select * from users;
OK
Adam 1 38 ATK093 CHEF
Benjamin 2 24 ATK032 SERVANT
Charles 3 45 ATK107 CASHIER
Ivy 4 30 ATK384 SERVANT
Linda 5 23 ATK132 ASSISTANT
.
.
.
Time taken: 0.059 seconds, Fetched: 50 row(s)
But issuing select max(age) from users
failed after submitting as mr job. The container log also doesn't have any information to figure it out why its getting failed.
hive> select max(age) from users;
Query ID = canballuser_20170808020101_5ed7c6b7-097f-4f5f-af68-486b45d7d4e
Total 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 mapreduce.job.reduces=<number>
Starting Job = job_1501851520242_0010, Tracking URL = http://hadoop-master:8088/proxy/application_1501851520242_0010/
Kill Command = /opt/cloudera/parcels/CDH-5.9.1-1.cdh5.9.1.p0.4/lib/hadoop/bin/hadoop job -kill job_1501851520242_0010
Hadoop job information for Stage-1: number of mappers: 0; number of reducers: 0
2017-08-08 02:01:11,472 Stage-1 map = 0%, reduce = 0%
Ended Job = job_1501851520242_0010 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-1: HDFS Read: 0 HDFS Write: 0 FAIL
Total MapReduce CPU Time Spent: 0 msec
If I get the workflow of the hive query execution from hive cli, it might be helpful for me to debug the issue further.