Hadoop-Let us Admin

Secondary Name Node

Secondary NameNode: This is not a backup NameNode. In fact, it is a poorly named component of the Hadoop platform. It performs some housekeeping functions for the NameNode.

The goal of the edits file is to accumulate the changes during the system operation. If the system is restarted, the contents of the edits file can be rolled into fsimage during the restart.

The role of the Secondary NameNode is to periodically merge the contents of the edits file in the fsimage file. To this end, the Secondary NameNode periodically executes the following sequence of steps:

  1. It asks the Primary to roll over the edits file, which ensures that new edits go to a new file. This new file is called edits.new.
  2. The Secondary NameNode requests the fsimage file and the edits file from the Primary.
  3. The Secondary NameNode merges the fsimage file and the edits file into a new fsimage file.
  4. The NameNode now receives the new fsimage file from the Secondary NameNode with which it replaces the old file. The edits file is now replaced with the contents of the edits. new file created in the first step.
  5. The fstime file is updated to record when the checkpoint operation took place.