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.
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
thanks for posting such useful information about Hadoop namenode
Great post…! clearly explained the Hadoop namenode is in safe mode with clear explaination. Thank you..!