默认的副本数量为3个
第一份:如果是单节点提交则存放在提交节点的客户端节点上,如果是集群提交则存放到提交集群中任一节点
第二份:存放到第一份副本所在的机架上的另外一个不同的节点上
第三份:存放到第一份所在的机架外的另外一个不同的节点上(同一数据中心)
更多的副本:随机选择与第一份副本所在节点同一数据中心上的任一节点进行存储
原文
For the common case, when the replication factor is three, HDFS’s
placement policy is to put one replica on one node in the local rack,
another on a different node in the local rack, and the last on a
different node in a different rack.
原文出处
http://hadoop.apache.org/docs/r2.7.2/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html#Data_Replication