2 longlongkong longlongkong 于 2014.06.11 12:08 提问

hive无法进行条件查询

用hive可以建表,执行不加条件的查询可以,如select * from t_hive;如果加上条件进行查询则失败,如select * from t_hive where a>30;则失败;执行过程如下:

hive> show tables;
OK
t_hive
t_hive2
t_hive3
Time taken: 0.058 seconds, Fetched: 3 row(s)
hive> select * from t_hive;
OK
16 2 3
61 12 13
41 2 31
17 21 3
71 2 31
1 12 34
11 2 34
Time taken: 0.156 seconds, Fetched: 7 row(s)
hive> select * from t_hive where a>30;
Total jobs = 1
Launching Job 1 out of 1
Number of reduce tasks is set to 0 since there's no reduce operator
Starting Job = job_1401172375533_0024, Tracking URL = http://master:8088/proxy/a pplication_1401172375533_0024/
Kill Command = /home/omeesas/software_setup/hadoop-2.4.0/bin/hadoop job -kill j ob_1401172375533_0024
Hadoop job information for Stage-1: number of mappers: 0; number of reducers: 0
2014-06-11 11:56:46,067 Stage-1 map = 0%, reduce = 0%
Ended Job = job_1401172375533_0024 with errors
Error during job, obtaining debugging information...
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.Ma pRedTask
MapReduce Jobs Launched:
Job 0: HDFS Read: 0 HDFS Write: 0 FAIL
Total MapReduce CPU Time Spent: 0 msec
hive>

web查看Hadoop错误日志如下:
Application application_1401172375533_0020 failed 2 times due to AM Container for appattempt_1401172375533_0020_000002 exited with exitCode: -1000 due to: java.io.FileNotFoundException: File /tmp/hadoop-root/nm-local-dir/filecache does not exist
.Failing this attempt.. Failing the application.

我新建了上如路径和文件,仍然不行。
有没有遇到或者知道如何解决的,跪求方法!谢谢!

3个回答

qq_18939995
qq_18939995   2016.10.11 10:55

有hadoop的服务没有起来:resourceManager这个服务没有启动

qq_18381803
qq_18381803 谢谢。可以运行了
大约一年之前 回复
ouy314585346
ouy314585346   2014.09.05 21:32

我也遇到同样的问题解决了吗?

payne91508
payne91508 一样的
9 个月之前 回复
hubeizhouteng
hubeizhouteng   2015.07.26 22:25

楼主,请问你问提解决了吗?我遇到同样的问题了,想请教下啊

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!