Skip to content

Hadoop – Namenode is in safe mode

Covers
Hadoop

Namenode loads the filesystem state from fsimage and stays in safe mode and wait for data nodes to report their blocks. Safemode is a read-only mode for HDFS cluster, so that it does not prematurely start replicating the blocks. Use following command to let the namenode leave safemode forcefully.

$ hadoop dfsadmin -safemode leave

In newer versions of hadoop command is deprecated. You can use hdfs command instead of hadoop. For example:

$ hdfs dfsadmin -safemode leave

You must run hadoop fsck so sort out any inconsistencies created in the hdfs due to above command.

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

3 Comments

  1. I Installed and set up Hadoop 2.8.2 on ubuntu 16.0.4 and all nodes are running while executing hadoop fs -ls i am facing this issue [warn util.nativecodeloader: unable to load native-hadoop library for your platform… using builtin-java classes where applicable ls: `.’: no such file or directory]

    thanks in advance

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top