Hadoop 坑爹的Be Replicated to 0 nodes, instead of 1 异常
有段时间不写博客了,感觉自己懒惰了不少,当然也是不够努力。近一年的时间一直在开发Hadoop基础应用。
新的项目上线之后发现,有些会员上传资源到我们集群的速度,既然跟我们集群的吞吐量差不多,达到了70M+/s的速度。 在向集群put数据时,抛出了异常:
org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /xxx/xxx/xx could only be replicated to 0 nodes, instead of 1
// check the communication traffic of the target machine if (considerLoad) { double avgLoad = 0; int size = clusterMap.getNumOfLeaves(); if (size != 0) { avgLoad = (double)fs.getTotalLoad()/size; } if (node.getXceiverCount() > (2.0 * avgLoad)) { logr.debug("Node "+NodeBase.getPath(node)+ " is not chosen because the node is too busy"); return false; }}
157 > ((27 + 45 + 44 + 54 + 35 + 50 + 104 + 55 + 73 + 69 + 157 + 146)/12 * 2)