UrbanPro
true

Learn Hadoop from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

How can you recover from a NameNode failure in Hadoop cluster?

B
Biswanath Banerjee
09/04/2018 0 0

How can you recover from a Namenode failure in Hadoop?

Why is Namenode so important?

Namenode is the most important Hadoop service. It contains the location of all blocks in the cluster. It maintains the state of the distributed file system.We have something called a secondary name node. Secondary Namenode is not a back up for the name node. When a name node fails, it is possible to recover from a previous checkpoint generated by Secondary Namenode.Secondary Namenode performs periodic checkpoint process.

How to recover a failed Namenode?

We faced with a situation where the node hosting the Namenode service has failed. The secondary Namenode is running on some other separate machine. In the core-default.XML , the fs.checkpoint. Dir property has been set previously. This property tells the Secondary Namenode where to save the checkpoints on the local file system.

Carry out the following steps to recover from a NameNode failure:

    1. Stop the Secondary NameNode:

$ cd /path/to/Hadoop

$ bin/hadoop-daemon.sh stop secondarynamenode

    2. Bring up a new machine to act as the new NameNode. This machine should have Hadoop installed, be configured like the previous NameNode, and ssh password-less login should be configured. Also, it should have the same IP and hostname as the previous NameNode.
   

    3. Copy the contents of fs.checkpoint.dir on the Secondary NameNode to the pdfs.name. Dir folder on the new NameNode machine.
   

    4. Start the new NameNode on the new machine:

$ bin/hadoop-daemon.sh start namenode

    5. Start the Secondary NameNode on the Secondary NameNode machine:

$ bin/hadoop-daemon.sh start secondarynamenode

    6. Verify that the NameNode started successfully by looking at the NameNode status page http://localhost:50070/

The working: -

We first log in to the Secondary Namenode to stop its service. Next, we set up the Namenode in a new machine.

Next, we copy all the checkpoints and editing files from the Secondary Namenode to the new Namenode. In this way, we recover the filesystem status, metadata and editions at the time of the last checkpoint. Finally, we restarted the new Namenode and Secondary Namenode.

0 Dislike
Follow 2

Please Enter a comment

Submit

Other Lessons for You

13 Things Every Data Scientist Must Know Today
We have spent close to a decade in data science & analytics now. Over this period, We have learnt new ways of working on data sets and creating interesting stories. However, before we could succeed,...

How to change a managed table to external
ALTER TABLE <table> SET TBLPROPERTIES('EXTERNAL'='TRUE') This above property will change a managed table to an external table

Rahul Sharma

0 0
0

BigDATA HADOOP Infrastructure & Services: Basic Concept
Hadoop Cluster & Processes What is Hadoop Cluster? Hadoop cluster is the collections of one or more than one Linux Boxes. In a Hadoop cluster there should be a single Master(Linux machine/box) machine...

Up, Up And Up of Hadoop's Future
The onset of Digital Architectures in enterprise businesses implies the ability to drive continuous online interactions with global consumers/customers/clients or patients. The goal is not just to provide...

Big Data
Bigdata Large amount of data and data may be various types such as structured, unstructured, and semi-structured, the data which cannot processed by our traditional database applications are not enough....
X

Looking for Hadoop Classes?

The best tutors for Hadoop Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Hadoop with the Best Tutors

The best Tutors for Hadoop Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more