What is Secondary NameNode in Apache Hadoop?

Free Online Certification Courses – Learn Today. Lead Tomorrow. Forums Apache Hadoop What is Secondary NameNode in Apache Hadoop?

Viewing 1 reply thread
  • Author
    Posts
    • #4801
      DataFlair TeamDataFlair Team
      Spectator

      Why is Secondary NameNode used in Hadoop?
      How Secondary NameNode solves the issue of Namenode?

    • #4803
      DataFlair TeamDataFlair Team
      Spectator

      Secondary NameNode
      At the time when NameNode starts it reads HDFS state from an image file (FsImage) at first, then from the edits log file, it applies edits and further, the NameNode writes new HDFS state to the FsImage. and afterward, it starts normal operation with an empty edits file. Moreover, NameNode merges FsImage and edits files, at the time of start-up, hence the edit log file could get very large over time. Well, next restart of Namenode takes longer, as a side effect of a larger edits file.

      Secondary Namenode solves this issue
      As its job, it simply downloads the FsImage and EditLogs from the NameNode then merges EditLogs with the FsImage (FileSystem Image). Though, it keeps edits log size within a limit only. Further, it keeps the modified FsImage into persistent storage. So, in the case of NameNode failure, we can use it.

      In addition, it performs a regular checkpoint, in HDFS.

      l

Viewing 1 reply thread
  • You must be logged in to reply to this topic.