HDFs Fundamentals (Hadoop1.0)

Source: Internet
Author: User

One, the client sends a write block request

Principle Introduction:

1, the client sends a write block request to the Namenode, NodeName receives this request to the client a message, that is the client should write the data to which Datanode, the client then writes the data to the assigned Datanode.

2, at this time, regardless of whether the client writes the data is successful, is written in the edits journal, at this time the number +1 in edits, if the write is successful, the corresponding metadata information will be added in memory (MetaData)

Second, the renewal principle of Namenode

Principle Introduction:

1, the trigger of Namenode update mechanism. There are two conditions: one is time, the maximum time interval is 3,600 seconds, the second is the size of the edits file, the default is when the edits file is greater than 64M, and regardless of whether the maximum time interval has been reached, the fsimage (that is, some metadata information) is forced to be updated;

2, when the Namenode update mechanism is triggered, this time will enter a switching state, that is, if you receive another user's write request, the operation information will not be placed in the edits, but into the file Edits.new file, which is to keep the data consistent.

3, Secondnamenode will download two files from Namenode, edits and Fsimage, through which two files will be synthesized a new fsimage (this is called fsiamge.ckpt).

4, when edits and fsimage information Update, will send the latest fsimage.ckpt to Namenode;

5, at this time Fsimage.ckpt will replace the original Fsimage file, at this time will be deleted edits file, with Edits.new file replacement, the previous reason not to delete the edits file is because when the Secondnamenode update fails, you can use again.

HDFs Fundamentals (Hadoop1.0)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.