当前位置: 代码迷 >> 综合 >> SemanticException org.apache.hadoop.ipc.RemoteException(java.io.IOException):
  详细解决方案

SemanticException org.apache.hadoop.ipc.RemoteException(java.io.IOException):

热度:106   发布时间:2023-11-22 07:02:56.0

项目场景:

在hive运行自定义函数时报错


问题描述:

hive> select myfunction1("Hello Hive Hello Hadoop,Hello World!");
FAILED: SemanticException org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /tmp/hive/wl/0de96e32-daea-4f9a-b23c-5a87295f1a8f/hive_2021-11-22_16-57-22_553_3163225586976661456-1/dummy_path/dummy_file could only be replicated to 0 nodes instead of minReplication (=1).  There are 0 datanode(s) running and no node(s) are excluded in this operation.at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget4NewBlock(BlockManager.java:1571)at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getNewBlockTargets(FSNamesystem.java:3107)at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:3031)at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:725)at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:492)at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982)at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2049)at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2045)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:1698)at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2043)

原因分析:

原因是DataNode(数据节点掉)了

[wl@master ~]$ jps
2193 SecondaryNameNode
2793 RunJar
3129 Jps
1963 NameNode
2363 ResourceManager

解决方案:

退出hive重启hadoop集群就OK了
在这里插入图片描述
在这里插入图片描述

  相关解决方案