1. 程式人生 > >HDFS讀寫檔案中涉及到的幾個思想

HDFS讀寫檔案中涉及到的幾個思想

HDFS讀寫檔案中涉及到的幾個思想

1.網路拓撲–節點距離計算

1.節點距離:兩個節點到達最近的共同祖先的距離總和。
2.圖解:
在這裡插入圖片描述

2.機架感知(副本節點選擇)

1.官方說明:http://hadoop.apache.org/docs/r2.7.2/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html#Data_Replication

關鍵句:
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.

2.圖解:
在這裡插入圖片描述

版權宣告:本部落格為記錄本人自學感悟,轉載需註明出處!
https://me.csdn.net/qq_39657909