hadoop ----SecondyNameNode 觸發合併(CheckPoint)fsimage和Edits的2種條件

觸發 CheckPoint(合併)的2種條件是:

1、當Edits的日誌條數達到一定的數量的時候(100w條)

2、當到了一定的時間(3600s),但是Edits的日誌條數還未達到指定的數量

 

-----------------------------------------------------------------------------------------------------------

其中這2個值都是可以進行修改的,hdfs-core.xml 

時間

dfs.namenode.checkpoint.period 3600s

The number of seconds between two periodic checkpoints. Support multiple time unit suffix(case insensitive), as described in dfs.heartbeat.interval.

 

日誌條數

dfs.namenode.checkpoint.txns

 

1000000 The Secondary NameNode or CheckpointNode will create a checkpoint of the namespace every 'dfs.namenode.checkpoint.txns' transactions, regardless of whether 'dfs.namenode.checkpoint.period' has expired.

 

修改這2個參數即可修改成你想要的數值

參考鏈接:

https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/hdfs-default.xml

 

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