Hive没有启动mapreduce工作..陷入执行中

时间:2016-11-08 06:34:25

标签: hive hadoop2

我正在尝试从表中选择count(*),但是在提交作业后,它会被卡住。 PFB的细节。

hive> select count(*) from txnrecords;
WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
Query ID = sambit_20161108115544_170f01cb-5825-4af1-8607-d25ceb84823b
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_1478581699153_0005, Tracking URL = http://localhost:8088/proxy/application_1478581699153_0005/
Kill Command = /home/sambit/hadoop-2.7.3/bin/hadoop job  -kill job_1478581699153_0005

注意:(从txnrecords中选择*)工作正常如下。

hive> select * from txnrecords;
OK
0   06-26-2011  4007024 40.33   Exercise & Fitness  Cardio Machine Accessories  Clarksville Tennessee   credit
1   06-26-2011  4006742 198.44  Exercise & Fitness  Weightlifting Gloves    Long Beach  California  credit
2   06-26-2011  4009775 5.58    Exercise & Fitness  Weightlifting Machine Accessories   Anaheim California  credit
3   06-26-2011  4002199 198.19  Gymnastics  Gymnastics Rings    Milwaukee   Wisconsin   credit
4   12-17-2011  4002613 98.81   Team Sports Field Hockey    Nashville   Tennessee   credit
5   12-17-2011  4007591 193.63  Outdoor Recreation  Camping & Backpacking & Hiking  Chicago Illinois    credit
6   12-17-2011  4002190 27.89   Puzzles Jigsaw Puzzles  Charleston  South Carolina  credit
7   12-17-2011  4002964 96.01   Outdoor Play Equipment  Sandboxes   Columbus    Ohio    credit
8   12-18-2011  4007361 10.44   Winter Sports   Snowmobiling    Des Moines  Iowa    credit
9   12-18-2011  4004798 152.46  Jumping Bungee Jumping  St. Petersburg  Florida cash
10  12-18-2011  4004646 180.28  Outdoor Recreation  Archery Reno    Nevada  cash
NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
Time taken: 0.227 seconds, Fetched: 12 row(s)

Queue Details

1 个答案:

答案 0 :(得分:0)

“select * from”的工作方式与“select count(*)”不同,最后一个做的更多。所以不要指望这一点。 根据我的经验,这个问题是由于在表列定义中使用了保留关键字,如果是这样,那么在容器日志中会出现如下错误消息:ParseException。 Mike Gan的建议是您的最佳选择。执行

yarn logs -applicationId <yourApplicationIdFromHive> 

获取容器的日志。