觸發 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.
|
日誌條數
|
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