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

Why is the Hadoop essential?
Capacity to store and process large measures of any information, rapidly. With information volumes and assortments always expanding, particularly from web-based life and the Internet of Things (IoT), that...

Big DATA Hadoop Online Training
Course Content for Hadoop DeveloperThis Course Covers 100% Developer and 40% Administration Syllabus.Introduction to BigData, Hadoop:- Big Data Introduction Hadoop Introduction What is Hadoop? Why Hadoop?...

Loading Hive tables as a parquet File
Hive tables are very important when it comes to Hadoop and Spark as both can integrate and process the tables in Hive. Let's see how we can create a hive table that internally stores the records in it...

Best way to learn any software Course
Hi First conform whether you are learning from a real time consultant. Get some Case Studies from the consultant and try to complete with the help of google not with consultant. Because in real time same situation will arise. Thank you

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