hadoop could only be replicated to 0 nodes instead of 1 解决方法
2013-07-04 17:12
621 查看
修改了replication后,执行hive语句报错如下:
经测试,使用hadoop fs -put 也报同样的错,应该是hdfs的错误。
奇怪的是 -ls -rmr都正常没有问题。
网上搜索了一下,
1. 有说是datanode没有启动的,但我这里不是。所有节点启动正常。
2.有说是开启了iptables,但我这里也不是
[root@Master hadoop]# service iptables status
iptables:未运行防火墙。
3.有说hdfs运行在safe模式下,但我都是-rmr,肯定不是这个问题
4.有篇文章:/content/3094796.html
说是hadoop中isGoodTarget方法对预选的数据节点做出了终审判决,然而除了磁盘空间可利用外,另外需稳定在一定的压力之下,这里的标准是Datanode中XceiverServer所接受的连接数,我们在使用Hadoop时,这个值很容易被忽略,因为这个值不方便被统计到。上段代码说明当前节点的连接数,不得大于集群所有节点平均连接数的两倍。
我想我的原因可能是这个,看了下live datenode可用空间不足10%,删除了几个大的文件,空间空出来了,
再次-put文件,正常;
再次运行hive的那个语句,正常; OK
hive> select count(1) from weblog; Total MapReduce jobs = 1 Launching Job 1 out of 1 Number of reduce tasks determined at compile time: 1 In order to change the average load for a reducer (in bytes): set hive.exec.reducers.bytes.per.reducer=<number> In order to limit the maximum number of reducers: set hive.exec.reducers.max=<number> In order to set a constant number of reducers: set mapred.reduce.tasks=<number> org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /tmp/hive-hadoop/hive_2013-07-04_15-36-07_345_4881871228589151814/-mr-10003/638ea85d-5738-4c1d-9d25-efdee53eb196 could only be replicated to 0 nodes, instead of 1 at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1556) at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:696) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:563) at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388) at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1083) at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382)
经测试,使用hadoop fs -put 也报同样的错,应该是hdfs的错误。
奇怪的是 -ls -rmr都正常没有问题。
网上搜索了一下,
1. 有说是datanode没有启动的,但我这里不是。所有节点启动正常。
2.有说是开启了iptables,但我这里也不是
[root@Master hadoop]# service iptables status
iptables:未运行防火墙。
3.有说hdfs运行在safe模式下,但我都是-rmr,肯定不是这个问题
4.有篇文章:/content/3094796.html
说是hadoop中isGoodTarget方法对预选的数据节点做出了终审判决,然而除了磁盘空间可利用外,另外需稳定在一定的压力之下,这里的标准是Datanode中XceiverServer所接受的连接数,我们在使用Hadoop时,这个值很容易被忽略,因为这个值不方便被统计到。上段代码说明当前节点的连接数,不得大于集群所有节点平均连接数的两倍。
我想我的原因可能是这个,看了下live datenode可用空间不足10%,删除了几个大的文件,空间空出来了,
再次-put文件,正常;
再次运行hive的那个语句,正常; OK
相关文章推荐
- hadoop文件系统错误could only be replicated to 0 nodes, instead of 1解决方法
- Hadoop上传文件时报错: could only be replicated to 0 nodes instead of minReplication (=1)....
- Hadoop: File could only be replicated to 0 nodes instead of minReplication (=1). There are 1 datanod
- Hadoop配置:file could only be replicated to 0 nodes, instead of 1问题解决方法
- hadoop 复制文件到hdfs报错 could only be replicated to 0 nodes instead of minReplication (=1). There are 0
- java 操作上传下载 HDFS:could only be replicated to 0 nodes instead of minReplication (=1). There are 1 da
- hadoop fs -put could only be replicated to 0 nodes, instead of 1 解决方法
- could only be replicated to 0 nodes instead of minReplication (=1)
- could only be replicated to 0 nodes, instead of 1 错误的解决方法
- hadoop异常“could only be replicated to 0 nodes, instead of 1” 解决
- could only be replicated to 0 nodes instead of minReplication (=1)
- File /hbase could only be replicated to 0 nodes instead of minReplication (=1). There are 30 datanode(s) running and no node(s) are excluded in this operation.
- hbase错误记录一; File /hbase/.tmp/hbase.version could only be replicated to 0 nodes instead of minReplica
- could only be replicated to 0 nodes instead of minReplication (=1). There are 4 datanode(s) running
- File***could only be replicated to 0 nodes instead of minReplication (=1)
- could only be replicated to 0 nodes instead of minReplication (=1). There are 0 datanode(s) running
- File/ could only be replicated to 0 nodes instead ofminRepLication (=1) There are 0 datanode(s) run
- hadoop异常“could only be replicated to 0 nodes, instead of 1” 解决
- could only be replicated to 0 nodes instead of minReplication (=1).
- home/hadoop/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1问题解决