Mehdi Medadian
Mehdi Medadian

Reputation: 7

NameNode and secondary Namenode

What is the role of a Secondary namenode, if at all Namenode fails ?

Upvotes: 0

Views: 247

Answers (3)

BruceWayne
BruceWayne

Reputation: 3374

Before going into this, i will explain about roles of NN and SNN.

NameNode: It contains metadata of datanodes, directory tree structure, fsimage and edit logs related to your entire cluster

SecondaryNameNode: It periodically collect fsimage and edit logs from NN and then merge those into new fsimage file, again it will push back into NN to decrease the size of NN metadata

So if NN fails

  1. SNN won't receive any updates from NN
  2. Your entire cluster go down
  3. With the help of SNN you can start another node as NN but SNN won't do NN works. It is just to collect fsimage and editlogs from NameNode

Upvotes: 1

PradeepKumbhar
PradeepKumbhar

Reputation: 3421

Perfect answer by @mobin-ranjbar

Also, this link will help you understand "For what purpose the Secondary Namenode is NOT meant?" ;)

Upvotes: 0

Mobin Ranjbar
Mobin Ranjbar

Reputation: 1360

Its role will be accelerate the startup progress. It is a helper node for NameNode and It is not the replacement or backup for the Namenode.

Upvotes: 0

Related Questions