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

猜你喜欢

转载自blog.csdn.net/weixin_38638777/article/details/106715583