Database Reference
In-Depth Information
Secondary namenode
The secondary namenode daemon is responsible for performing periodic housekeeping
functions for namenode. It only creates checkpoints of the filesystem metadata ( fsimage )
present in namenode by merging the edits logfile and the fsimage file from the na-
menode daemon. In case the namenode daemon fails, this checkpoint could be used to re-
build the filesystem metadata. However, it is important to note that checkpoints are done in
intervals and it is possible that the checkpoint data could be slightly outdated. Rebuilding
the fsimage file using such a checkpoint could lead to data loss. The secondary namen-
ode is not a failover node for the namenode daemon.
It is recommended that the secondary namenode daemon be hosted on a separate machine
for large clusters. The checkpoints are created by merging the edits logfiles and the
fsimage file from the namenode daemon.
The following are the steps carried out by the secondary namenode daemon:
1. Get the edits logfile from the primary namenode daemon.
2. Get the fsimage file from the primary namenode daemon.
3. Apply all the actions present in the edits logs to the fsimage file.
4. Push the fsimage file back to the primary namenode.
This is done periodically and so whenever the namenode daemon is restarted, it would have
a relatively updated version of the fsimage file and the boot up time would be signific-
antly faster. The following diagram shows the communication between namenode and sec-
ondary namenode:
Search WWH ::




Custom Search