org.apache.hadoop.hdfs.server.namenode
Class FSNamesystem.SafeModeInfo
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.SafeModeInfo
- Enclosing class:
- org.apache.hadoop.hdfs.server.namenode.FSNamesystem
public class FSNamesystem.SafeModeInfo
- extends Object
SafeModeInfo contains information related to the safe mode.
An instance of FSNamesystem.SafeModeInfo
is created when the name node
enters safe mode.
During name node startup FSNamesystem.SafeModeInfo
counts the number of
safe blocks, those that have at least the minimal number of
replicas, and calculates the ratio of safe blocks to the total number
of blocks in the system, which is the size of blocks in
FSNamesystem.blockManager
. When the ratio reaches the
threshold
it starts the SafeModeMonitor daemon in order
to monitor whether the safe mode extension
is passed.
Then it leaves safe mode and destroys itself.
If safe mode is turned on manually then the number of safe blocks is
not tracked because the name node is not intended to leave safe mode
automatically in the case.
- See Also:
ClientProtocol.setSafeMode(HdfsConstants.SafeModeAction, boolean)
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2014 Apache Software Foundation. All Rights Reserved.