public class FSNamesystem.SafeModeInfo extends Object
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.
ClientProtocol.setSafeMode(HdfsConstants.SafeModeAction, boolean)Copyright © 2017 Apache Software Foundation. All Rights Reserved.