本文共 728 字,大约阅读时间需要 2 分钟。
NameNode
第一次启动HDFS
- 格式化HDFS,目的就是生成fsimage
- start NameNode,读取fsimage文件
- start DataNode,向NameNode注册;block report(块汇报)
- create dir /user/hw/tmp -> write [edits]
- put files /user/beifeg/tmp(*-site.xml) -> write [edits]
- delete file /user/beifeng/tmp/core-site.xml -> write [edits]
第二次启动HDFS
- NameNode
- read [fsimage]
- read [edits]
- gen write fsimage [new]
- gen edits [null]
- DataNode
- create dir /user/beifeng/tmp -> write [edits]
- put files /user/beifeg/tmp(*-site.xml) -> write [edits]
- delete file /user/beifeng/tmp/core-site.xml -> write [edits]
SecondaryNameNode辅助功能讲解
- NameNode中的编辑日志文件太大的话如何处理。需要借助SecondaryNameNode.
- 定期的合并 fsimage+edits ->new fsimage
转载于:https://www.cnblogs.com/Grand-Jon/p/10212091.html