When Hadoop Enter in Safe Mode

Viewing 2 reply threads
  • Author
    Posts
    • #5716
      DataFlair TeamDataFlair Team
      Spectator

      when hadoop / namenode enter in the safe mode ? what is the need of safemode ? why namenode enters into the safemode

    • #5717
      DataFlair TeamDataFlair Team
      Spectator

      When Hadoop NameNode enter in the Safemode ?

      The Namenode enters Safemode in primarily two cases:

      During the startup of namenode daemon, the namenode enters safe mode for a certain period of time.
      The administrator can also enter the Safemode manually with the below command (in the case of maintenance/up-gradation of the cluster ):
      hadoop dfsadmin -safemode enter

      What is the need of Safemode ?/ why namenode enters into the Safemode?

      The primary reason of namenode to enter Safemode is to ensure that the minimum replication condition is reached. The minimum replication condition is when 99.9% of the blocks in the whole HDFS meet their minimum replication factor/level (which is by default 1, and can be configured by dfs.replication.min)
      This ensures High Availability, reliability, Fault Tolerance of data before any data manipulation in file system takes place.

    • #5719
      DataFlair TeamDataFlair Team
      Spectator

      On startup, the Name Node enters state called Safe mode.
      During Safe mode:

      1) Replication and Deletion of data blocks does not occur.(HDFS Cluster is in read only)
      2) Name Node receives Heartbeat and of block reports from datanodes. This contains a list of data blocks that a Data Node is hosting.

      To know the status of Safemode, use command:
      hdfs dfsadmin –safemode get

      To enter Safemode, use command:
      hdfs dfsadmin -safemode enter

      To come out of Safemode, use command:
      hdfs dfsadmin -safemode leave

Viewing 2 reply threads
  • You must be logged in to reply to this topic.