One
Fsiamges files are typically metadata information for the entire cluster. Every time it's modified very well memory, IO.
So the introduction of edits
File. Keep a record of each modification to the metadata, and periodically merge by secondary Namenode.
Second, the process
1.Secondary Namenode Request edits and Fsimage merge.
2.Namenode stops modification of the edits file and generates a edits.new file that stores changes to the metadata that occurred during the merge
3.Secondary Namenode Get edits files and fsimages files via HTTP GET method
4.Secondary Namenode Import the requested fsimages file into memory and follow the edits file to generate the Fsimags.ckpt file
5.Secondary namenode send fsimages.ckpt file to Namenode via HTTP Post
6.Namenode after accepting the fsimages.ckpt file, replace the original fsimages file and change the edits.new file to edits file so that the new merged fsimages file and the smaller edits file are obtained
Hadoop Cluster Management fsimage and edits working mechanism insider