掉線時限參數設置

DataNode進程死亡或者網絡故障造成DataNode無法與namenode通信,namenode不會立即把該節點判定爲死亡,要經過一段時間,這段時間暫稱作超時時長。HDFS默認的超時時長爲10分鐘+30秒。如果定義超時時間爲timeout,則超時時長的計算公式爲:
timeout = 2 * dfs.namenode.heartbeat.recheck-interval + 10 * dfs.heartbeat.interval
而默認的dfs.namenode.heartbeat.recheck-interval大小爲5分鐘,dfs.heartbeat.interval默認爲3秒
需要注意的是hdfs-site.xml配置文件中的heartbeat.recheck.interval的單位爲毫秒,dfs.heartbeat.interval的單位爲秒

dfs.namenode.heartbeat.recheck-interval
300000


dfs.heartbeat.interval
3

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章