Free Online Certification Courses – Learn Today. Lead Tomorrow. › Forums › Apache Hadoop › How to remove safemode of namenode forcefully
- This topic has 1 reply, 1 voice, and was last updated 5 years, 6 months ago by DataFlair Team.
-
AuthorPosts
-
-
September 20, 2018 at 2:37 pm #5225DataFlair TeamSpectator
Whenever I start Hadoop cluster, namenode enters into the safemode. Namenode takes very long time to leave safemode automatically. I want to leave the safemode forcefully, is it possible ? If namenode is removed from safemode manually, will there be any consequences ?
-
September 20, 2018 at 2:37 pm #5226DataFlair TeamSpectator
Safemode is a maintenance state of NameNode during which NameNode doesn’t allow any modifications to the file system. HDFS cluster is in read mode only during safemode.
At the startup of NameNode it loads the file system namespace from the last saved fsimage into its main memory and the edits log file. Then, merges edits log file on fsimage and results in new file system namespace. Then it receives Block reports containing information about block location from all datanodes. In Safemode NameNode performs collection of block reports from datanodes.
NameNode enters safemode automatically during its start up. NameNode leaves Safemode after the DataNodes have reported that most blocks are available.
Use below command to know status of Safemode
hadoop dfsadmin –safemode get
Use below command to know enter in Safemode
bin/hadoop dfsadmin –safemode enter
Use below command to leave Safemode
hadoop dfsadmin -safemode leave
-
-
AuthorPosts
- You must be logged in to reply to this topic.