How to remove safemode of namenode forcefully

Free Online Certification Courses – Learn Today. Lead Tomorrow. Forums Apache Hadoop How to remove safemode of namenode forcefully

Viewing 1 reply thread
  • Author
    Posts
    • #5225
      DataFlair TeamDataFlair Team
      Spectator

      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 ?

    • #5226
      DataFlair TeamDataFlair Team
      Spectator

      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

Viewing 1 reply thread
  • You must be logged in to reply to this topic.