NameNode
- 内存
- 本地磁盘
- fsimage
- edits
第一次启动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
- 注册
- block report
- 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