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

Lets look at Apache Spark's Competitors. Who are the top Competitors to Apache Spark today.
Apache Spark is the most popular open source product today to work with Big Data. More and more Big Data developers are using Spark to generate solutions for Big Data problems. It is the de-facto standard...
B

Biswanath Banerjee

1 0
0

Learn Python : Slicing out an email address
We take a small task of slicing out the username and domain name from an email address. We ask the user to type his email address. We take his email address and slice out first his username and then the...
B

Biswanath Banerjee

0 0
0

Learn Python : Formatting with the .format () method
A good way to format objects into your strings for print statements is with the string.format() method. The syntax is :'String here {} then also {}'.format('something1','something2')Example 1:print("This...
B

Biswanath Banerjee

0 1
0

Solving the issue of Namenode not starting during Single Node Hadoop installation
On firing jps command, if you see that name node is not running during single node hadoop installation , then here are the steps to get Name Node running Problem: namenode not getting started Solution:...
B

Biswanath Banerjee

1 0
0

Build an interactive Dictionary using Python 3.x
I have downloaded a 5MB data base consisting of words and their meanings in a json file . I want to write a python progrsm which will ask the user to enter a word and then the program will search through...
B

Biswanath Banerjee

0 0
0
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