当前位置: 首页 > article >正文

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

 1.加载数据失败

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

在hive日志发现
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /user/hive/warehouse/student/hive.txt 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 org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget(BlockManager.java:1503)
	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:3124)
	at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:636)
	at org.apache.hadoop.hdfs.server.namenode.AuthorizationProviderProxyClientProtocol.addBlock(AuthorizationProviderProxyClientProtocol.java:188)
	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:476)
	at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
	at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:587)
	at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1026)
	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2013)
	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2009)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1642)
	at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2007)

	at org.apache.hadoop.ipc.Client.call(Client.java:1411)
	at org.apache.hadoop.ipc.Client.call(Client.java:1364)
	at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
	at com.sun.proxy.$Proxy19.addBlock(Unknown Source)
	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.addBlock(ClientNamenodeProtocolTranslatorPB.java:391)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccesThere are 1 datanode(s) running and no node(s) are excluded in this operation.
	at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget(BlockManager.java:1503)
	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:3124)
	at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:636)
	at org.apache.hadoop.hdfs.server.namenode.AuthorizationProviderProxyClientProtocol.addBlock(AuthorizationProviderProxyClientProtocol.java:188)
	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:476)
	at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
	at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:587)
	at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1026)
	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2013)
	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2009)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1642)
	at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2007)

	at org.apache.hadoop.ipc.Client.call(Client.java:1411)
	at org.apache.hadoop.ipc.Client.call(Client.java:1364)
	at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
	at com.sun.proxy.$Proxy19.addBlock(Unknown Source)
	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.addBlock(ClientNamenodeProtocolTranslatorPB.java:391)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAcces
<span style="color:#ff0000">There are 1 datanode(s) running and no node(s) are excluded in this operation.</span>
大概是datanode(s) 挂掉了 ,敲下jps验证一下,果真如此,不得不重启一下hadoop进程了

2.Hive中运行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 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

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

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

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

修改 tez :默认 tez.session.am.dag.submit.timeout.secs=600  

改成 0

修改 hive : tez.session.am.dag.submit.timeout.secs = xxxx

改成 0

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


http://www.kler.cn/a/146880.html

相关文章:

  • Centos使用人大金仓ksql
  • Linux守护Pythom脚本运行——Supervisor学习总结
  • nodejs+mysql+vue3 应用实例剖析
  • HTML之列表学习记录
  • 笔记|M芯片MAC (arm64) docker上使用 export / import / commit 构建amd64镜像
  • 牛客题库 21738 牛牛与数组
  • SpringBoot——国际化
  • 【MySQL系列】PolarDB入门使用
  • KubeVela核心控制器原理浅析
  • Introducing the Arm architecture
  • 黑马点评Redis笔记
  • java springboot测试类Transactional解决 测试过程中在数据库留下测试数据问题
  • ArgoCD基本组件
  • 基于Hadoop的区块链海量数据存储的设计与实现
  • 【开源】基于Vue和SpringBoot的食品生产管理系统
  • vr小鼠虚拟解剖实验教学平台减少了受感染风险
  • 【华为OD题库-038】支持优先级的对列-java
  • CountDownLatch和CyclicBarrier源码详解
  • 计算机毕业设计 基于SpringBoot的无人智慧超市管理系统的设计与实现 Java实战项目 附源码+文档+视频讲解+答疑
  • android基于UDP实现聊天小功能
  • 计算机毕业设计|基于SpringBoot+MyBatis框架的仿天猫商城购物系统设计与实现
  • 第1章 爬虫基础
  • B树与B+树的对比
  • 树的序列化与反序列化
  • 自建CA实战之 《0x01 Nginx 配置 https单向认证》
  • C#线程 ConcurrentQueue安全队列介绍