JAVA API 操作HDFS遇到问题
来源:3-11 Java API操作HDFS文件系统
apodemakeles
2017-09-18
我的虚拟机放在阿里云上, create方法失败,mkdirs和cat却成功
使用shell, -put 可以成功写入文件
我在本机的VMWare上部署了一套,按照一样的方式,create方法可以成功
阿里云上我开了8020,50070端口,后来乱试又开了8021, 50010端口
我截取异常栈上的一些我认为重要的错误信息:
17/09/18 10:19:20 INFO hdfs.DFSClient: Exception in createBlockOutputStream
java.net.ConnectException: Connection timed out: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
......
17/09/18 10:19:20 WARN hdfs.DFSClient: Abandoning BP-2124473397-172.17.27.58-1505697429586:blk_1073741829_1005
17/09/18 10:19:20 WARN hdfs.DFSClient: Excluding datanode DatanodeInfoWithStorage[172.17.27.58:50010,DS-1b16be95-7c4d-4b75-a4f5-76526271e147,DISK]
17/09/18 10:19:20 WARN hdfs.DFSClient: DataStreamer Exception
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /hdfsapi/test/a.txt could only be replicated to 0 nodes instead of minReplication (=1). There are 1 datanode(s) running and 1 node(s) are excluded in this operation.
......
1回答
-
Michael_PK
2017-09-18
你确定下datanode活不
022017-09-18
相似问题