Hive中常出现的错误(不定时更新)

时间:2025-01-22 08:30:28

 1.加载数据失败

hive> load data local inpath '/home/user/' into table studentl
    > ;
FAILED: SemanticException [Error 10001]: Line 1:56 Table not found 'studentl'
hive> load data local inpath '/home/user/' into table student;
Loading data to table 
Failed with exception Unable to move source file:/home/user/ to destination hdfs://com.qiyu02:8020/user/hive/warehouse/student/
FAILED: Execution Error, return code 1 from 

在hive日志发现
(): File /user/hive/warehouse/student/ could only be replicated to 0 nodes instead of minReplication (=1).  There are 1 datanode(s) running and no node(s) are excluded in this operation.
	at (:1503)
	at (:3124)
	at (:636)
	at (:188)
	at (:476)
	at $ClientNamenodeProtocol$()
	at $Server$(:587)
	at $(:1026)
	at $Handler$(:2013)
	at $Handler$(:2009)
	at (Native Method)
	at (:415)
	at (:1642)
	at $(:2007)

	at (:1411)
	at (:1364)
	at $(:206)
	at .$(Unknown Source)
	at (:391)
	at .invoke0(Native Method)
	at There are 1 datanode(s) running and no node(s) are excluded in this operation.
	at (:1503)
	at (:3124)
	at (:636)
	at (:188)
	at (:476)
	at $ClientNamenodeProtocol$()
	at $Server$(:587)
	at $(:1026)
	at $Handler$(:2013)
	at $Handler$(:2009)
	at (Native Method)
	at (:415)
	at (:1642)
	at $(:2007)

	at (:1411)
	at (:1364)
	at $(:206)
	at .$(Unknown Source)
	at (:391)
	at .invoke0(Native Method)
	at 
<span style="color:#ff0000">There are 1 datanode(s) running and no node(s) are excluded in this operation.</span>
大概是datanode(s) 挂掉了 ,敲下jps验证一下,果真如此,不得不重启一下hadoop进程了

中运行Mapredurce程序时:

错误:

Ended Job = job_1504575362948_0022 with errors Error during job, obtaining debugging information...

hive (person)> select password from user1;
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_1504575362948_0022, Tracking URL = http://com.qiyu02:8088/proxy/application_1504575362948_0022/
Kill Command = /opt/modules/hadoop-2.5.0-cdh5.3.6/bin/hadoop job  -kill job_1504575362948_0022
Hadoop job information for Stage-1: number of mappers: 0; number of reducers: 0
2017-09-05 11:44:53,804 Stage-1 map = 0%,  reduce = 0%
Ended Job = job_1504575362948_0022 with errors
Error during job, obtaining debugging information...
FAILED: Execution Error, return code 2 from 
MapReduce Jobs Launched: 
Stage-Stage-1:  HDFS Read: 0 HDFS Write: 0 FAIL
Total MapReduce CPU Time Spent: 0 msec

网上说法一大堆!说什么内存不够啊、ResourceManger没成功启动啊....等等全试了一遍,还是没解决。。。

后来猜测可能是内核的原因,改下内核,重新启动就好了

3. hive on tez  ,yarn 任务一直都running 状态。

修改 tez :默认 =600  

改成 0

修改 hive :  = xxxx

改成 0

资源有限的话  改成 0,越早释放资源越好