The Hadoop dfsadmin Command Options

Part of the Hadoop For Dummies Cheat Sheet

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 | wait 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 cluster.
-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 | force 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 deleted.
-setQuota <quota> <dirname>...<dirname> 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 directories simultaneously.
-clrQuota <dirname>...<dirname> Clears the upper limit on the number of names in the directory tree. You can clear this limit for one or more directories simultaneously.
-restoreFailedStorage true | false | check 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.
  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus

SERIES
Hadoop For Dummies Cheat Sheet

Advertisement

Inside Dummies.com