博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hive 动态分区太多问题
阅读量:6712 次
发布时间:2019-06-25

本文共 4972 字,大约阅读时间需要 16 分钟。

hot3.png

hive 执行过程中会报下面的错误

org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.server.namenode.LeaseExpiredException): No lease on /tmp/hive/root/_tez_session_dir/a7af1ef7-d029-4ba9-98ac-139b60d39c07/.tez/application_1477555078714_0001/recovery/1/summary (inode 451603): File does not exist. Holder DFSClient_NONMAPREDUCE_1152536667_1 does not have any open files.	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkLease(FSNamesystem.java:3521)	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.completeFileInternal(FSNamesystem.java:3611)	at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.completeFile(FSNamesystem.java:3578)	at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.complete(NameNodeRpcServer.java:905)	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.complete(ClientNamenodeProtocolServerSideTranslatorPB.java:544)	at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)	at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:640)	at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982)	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2313)	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2309)	at java.security.AccessController.doPrivileged(Native Method)	at javax.security.auth.Subject.doAs(Subject.java:422)	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1724)	at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2307)	at org.apache.hadoop.ipc.Client.getRpcResponse(Client.java:1552)	at org.apache.hadoop.ipc.Client.call(Client.java:1496)	at org.apache.hadoop.ipc.Client.call(Client.java:1396)	at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:233)	at com.sun.proxy.$Proxy12.complete(Unknown Source)	at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.complete(ClientNamenodeProtocolTranslatorPB.java:501)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:498)	at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:278)	at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:194)	at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:176)	at com.sun.proxy.$Proxy13.complete(Unknown Source)	at org.apache.hadoop.hdfs.DFSOutputStream.completeFile(DFSOutputStream.java:2361)	at org.apache.hadoop.hdfs.DFSOutputStream.closeImpl(DFSOutputStream.java:2338)	at org.apache.hadoop.hdfs.DFSOutputStream.close(DFSOutputStream.java:2303)	at org.apache.hadoop.fs.FSDataOutputStream$PositionCache.close(FSDataOutputStream.java:72)	at org.apache.hadoop.fs.FSDataOutputStream.close(FSDataOutputStream.java:106)	at org.apache.tez.dag.history.recovery.RecoveryService.serviceStop(RecoveryService.java:222)	at org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221)	at org.apache.hadoop.service.ServiceOperations.stop(ServiceOperations.java:52)	at org.apache.hadoop.service.ServiceOperations.stopQuietly(ServiceOperations.java:80)	at org.apache.hadoop.service.CompositeService.stop(CompositeService.java:157)	at org.apache.hadoop.service.CompositeService.serviceStop(CompositeService.java:131)	at org.apache.tez.dag.history.HistoryEventHandler.serviceStop(HistoryEventHandler.java:82)	at org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221)	at org.apache.hadoop.service.ServiceOperations.stop(ServiceOperations.java:52)	at org.apache.hadoop.service.ServiceOperations.stopQuietly(ServiceOperations.java:80)	at org.apache.hadoop.service.ServiceOperations.stopQuietly(ServiceOperations.java:65)	at org.apache.tez.dag.app.DAGAppMaster.stopServices(DAGAppMaster.java:1768)	at org.apache.tez.dag.app.DAGAppMaster.serviceStop(DAGAppMaster.java:1949)	at org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221)	at org.apache.tez.dag.app.DAGAppMaster$DAGAppMasterShutdownHandler$AMShutdownRunnable.run(DAGAppMaster.java:864)	at java.lang.Thread.run(Thread.java:745)

网上搜索下,大概是说hive动态分区过大。需要修改如下参数(改大点)

set hive.exec.max.dynamic.partitions=100000;

set hive.exec.max.dynamic.partitions.pernode=100000;

其实本质原因可能是:运行了并行任务时,当一个任务结束时可能会删除掉其他任务的文件。当另一个任务需要获取他的文件时抛出异常。

 

Does your hive query create parallel MR jobs ? I had the same problem, and found that: :

When the job ends he deletes /data/work/ folder. If few jobs are running in parallel the deletion will also delete the files of the another job. actually I need to delete /data/work/.

In other words this exception is thrown when the job try to access to files which are not existed anymore

 

转载于:https://my.oschina.net/u/2277929/blog/776618

你可能感兴趣的文章
Spring Boot(06)——参数配置机制
查看>>
【WPF】右下角弹出自定义通知样式(Notification)——简单教程
查看>>
keras 使用笔记
查看>>
Android中主要类的继承关系梳理汇总
查看>>
webApp爬坑之路(1)
查看>>
Python发送邮件模块之——yagmail模块
查看>>
Android 分享微信小程序失败二三事
查看>>
SpringBoot通过jar包启动时MyBatis无法定位实体类
查看>>
linux系统常用命令
查看>>
面对霍金的担忧,人工智能会让我们在火星实现定居吗
查看>>
定制一款漂亮的终端
查看>>
timed out waiting for to be synced
查看>>
(5)Python字典
查看>>
mysql问题
查看>>
为何要领域驱动设计
查看>>
ios GCD ---- (1)
查看>>
Pi编译安装PHP/Nginx并安装完整LEMP环境
查看>>
HTTPS 也不安全?被发现新漏洞会暴露你的数据
查看>>
x86 和 ARM 谁能主宰服务器市场?Linux 之父和 Redis 之父有分歧了
查看>>
dva.js学习梳理集
查看>>