The Hadoop dfsadmin Command Options
The dfsadmin tools are a specific set of tools designed to help you root out information about your Hadoop Distributed File system (HDFS). As an added bonus, you can use them to perform some administration operations on HDFS as well.
|Option||What It Does|
|-report||Reports basic file system information and statistics.|
|-safemode enter | leave | get |
|Manages safe mode, a NameNode state in which changes to
the name space are not accepted and blocks can be neither
replicated nor deleted. The NameNode is in safe mode during
start-up so that it doesn’t prematurely start replicating
blocks even though there are already enough replicas in the
|-refreshNodes||Forces the NameNode to reread its configuration, including the
dfs.hosts.exclude file. The NameNode
decommissions nodes after their blocks have been replicated onto
machines that will remain active.
|-finalizeUpgrade||Completes the HDFS upgrade process. DataNodes and the NameNode
delete working directories from the previous version.
|-upgradeProgress status | details |
|Requests the standard or detailed current status of the
distributed upgrade, or forces the upgrade to proceed.
|-metasave filename||Saves the NameNode’s primary data structures to filename in a directory that’s
specified by the hadoop.log.dir property.
File filename, which is
overwritten if it already exists, contains one line for each of
these items: a) DataNodes that are exchanging heartbeats with the
NameNode; b) blocks that are waiting to be replicated; c) blocks
that are being replicated; and d) blocks that are waiting to be
|Sets an upper limit on the number of names in the directory
tree. You can set this limit (a long integer) for one or more
|Clears the upper limit on the number of names in the directory
tree. You can clear this limit for one or more directories
|-restoreFailedStorage true | false |
|Turns on or off the automatic attempts to restore failed
storage replicas. If a failed storage location becomes available
again, the system attempts to restore edits and the fsimage during a checkpoint. The check option returns the current setting.
|-help [cmd]||Displays help information for the given command or for all
commands if none is specified.