Thursday, June 19, 2014

NAME NODE (NN)

1.  NAME NODE
-  NAME NODE will act like an MASTER and it will manages the file system namespace. It                                                  maintains the filesystem tree and the metadata for all the files and the directories in the tree.
-  NN will store the METADATA.
- METADATA is the data about physical location of the blocks & by combining which   blocks the data will be prepared.
-  In any case if the NN failed it is called SPOF (single point of failure).
-  The NN will only communicate with clients.
-  The NN is also having capabilities of storing Data in it.
-  NN is very sensitive, even though failures are very rare.

PERSISTANCE FILE SYSTEM in NN

This filesystem metadata is stored in two different constructs: the FSIMAGE and the EDIT LOG.
Ø  FSIMAGE  
Ø  EDITLOG
                                         The fsimage is a file that represents a point-in-time snapshot of the filesystem’s metadata. However, while the fsimage file format is very efficient to read, it’s unsuitable for making small incremental updates like renaming a single file. Thus, rather than writing a new fsimage every time the namespace is modified, the NameNode instead records the modifying operation in the edit log for durability. This way, if the NameNode crashes, it can restore its state by first loading the fsimage then replaying all the operations (also called edits or transactions) in the edit log to catch up to the most recent state of the namesystem. The edit log comprises a series of files, called edit log segments, that together represent all the namesystem modifications made since the creation of the fsimage.             


CHECK POINT MECHANISUM

                 Check pointing is a process that takes an fsimage and edit log and compacts them into a new fsimage. This way, instead of replaying a potentially unbounded edit log, the NameNode can load the final in-memory state directly from the fsimage. This is a far more efficient operation and reduces NameNode startup time.

No comments:

Post a Comment