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.

Advertisement
$ 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.

Share.

3 Comments

  1. Sai Indra Kumar K N V on

    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

Exit mobile version