我已经部署了一个CDH-5.9集群,其中MR作为hive执行引擎。我有一个名为"用户"有50行。每当我执行查询select * from users
时,工作正常如下:
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)
但是在提交作为先生职位后发出select max(age) from users
失败了。容器日志也没有任何信息可以弄清楚它失败的原因。
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
如果我从hive cli获得hive查询执行的工作流程,那么我可能会对进一步调试问题有所帮助。
答案 0 :(得分:3)
Hive查询执行流程涉及很多组件。这里解释了高级架构:https://cwiki.apache.org/confluence/display/Hive/Design
本文档中提供了更详细的组件文档链接。
典型的查询执行流程(高级别)
Hive documentatio root在这里:https://cwiki.apache.org/confluence/display/Hive/Home您可以找到有关不同组件的更多详细信息。 您还可以学习源代码以获取有关某些类实现的更多详细信息。
Hadoop职位跟踪器文档:https://wiki.apache.org/hadoop/JobTracker