dfsadmin
Runs a HDFS dfsadmin.
The usage is as follows:
$ hdfs dfsadmin [-report [-live] [-dead] [-decommissioning] [-enteringmaintenance] [-inmaintenance]]
$ hdfs dfsadmin [-safemode enter | leave | get | wait | forceExit]
$ hdfs dfsadmin [-saveNamespace [-beforeShutdown]]
$ hdfs dfsadmin [-rollEdits]
$ hdfs dfsadmin [-restoreFailedStorage true |false |check]
$ hdfs dfsadmin [-refreshNodes]
$ hdfs dfsadmin [-setQuota <quota> <dirname>...<dirname>]
$ hdfs dfsadmin [-clrQuota <dirname>...<dirname>]
$ hdfs dfsadmin [-setSpaceQuota <quota> [-storageType <storagetype>] <dirname>...<dirname>]
$ hdfs dfsadmin [-clrSpaceQuota [-storageType <storagetype>] <dirname>...<dirname>]
$ hdfs dfsadmin [-finalizeUpgrade]
$ hdfs dfsadmin [-rollingUpgrade [<query> |<prepare> |<finalize>]]
$ hdfs dfsadmin [-upgrade [query | finalize]]
$ hdfs dfsadmin [-refreshServiceAcl]
$ hdfs dfsadmin [-refreshUserToGroupsMappings]
$ hdfs dfsadmin [-refreshSuperUserGroupsConfiguration]
$ hdfs dfsadmin [-refreshCallQueue]
$ hdfs dfsadmin [-refresh <host:ipc_port> <key> [arg1..argn]]
$ hdfs dfsadmin [-reconfig <namenode|datanode> <host:ipc_port> <start |status |properties>]
$ hdfs dfsadmin [-printTopology]
$ hdfs dfsadmin [-refreshNamenodes datanodehost:port]
$ hdfs dfsadmin [-getVolumeReport datanodehost:port]
$ hdfs dfsadmin [-deleteBlockPool datanode-host:port blockpoolId [force]]
$ hdfs dfsadmin [-setBalancerBandwidth <bandwidth in bytes per second>]
$ hdfs dfsadmin [-getBalancerBandwidth <datanode_host:ipc_port>]
$ hdfs dfsadmin [-fetchImage <local directory>]
$ hdfs dfsadmin [-allowSnapshot <snapshotDir>]
$ hdfs dfsadmin [-disallowSnapshot <snapshotDir>]
$ hdfs dfsadmin [-shutdownDatanode <datanode_host:ipc_port> [upgrade]]
$ hdfs dfsadmin [-evictWriters <datanode_host:ipc_port>]
$ hdfs dfsadmin [-getDatanodeInfo <datanode_host:ipc_port>]
$ hdfs dfsadmin [-metasave filename]
$ hdfs dfsadmin [-triggerBlockReport [-incremental] <datanode_host:ipc_port> [-namenode <namenode_host:ipc_port>]]
$ hdfs dfsadmin [-listOpenFiles [-blockingDecommission] [-path <path>]]
$ hdfs dfsadmin [-help [cmd]]
--report [-live] [-dead] [-decommissioning] [-enteringmaintenance] [-inmaintenance] |
Reports basic filesystem information and statistics. |
safemode enter|leave|get|wait|forceExit |
Safe mode maintenance command. Safe mode is a NameNode state in which it:
Safe mode is entered automatically at NameNode startup, and the node leaves the safe mode automatically when the configured minimum percentage of blocks satisfies the minimum replication condition.
|
-saveNamespace [-beforeShutdown] |
Saves the current namespace into storage directories and resets the edits log. |
-rollEdits |
Rolls the edit log on the active NameNode |
-restoreFailedStorage true|false|check |
Turns on/off automatic attempt to restore failed storage replicas. |
-refreshNodes |
Re-reads the hosts and exclude files to update the set of DataNodes that are allowed to connect to the NameNode and those that should be decommissioned or recommissioned |
-setQuota <quota> <dirname>…<dirname> |
Sets the quota for each directory |
-clrQuota <dirname>…<dirname> |
Removes any name quota for each directory. |
-setSpaceQuota <quota> [-storageType <storagetype>] <dirname>…<dirname> |
Sets the storage type quota to bytes of storage type specified for each directory |
-clrSpaceQuota [-storageType <storagetype>] <dirname>…<dirname> |
Removes storage type quota specified for each directory. |
-finalizeUpgrade |
Finalizes upgrade of HDFS. |
-rollingUpgrade [<query>|<prepare>|<finalize>] |
Executes a rolling upgrade action:
|
-upgrade query|finalize |
Queries the current upgrade status |
-refreshServiceAcl |
Reloads the service-level authorization policy file |
-refreshUserToGroupsMappings |
Refreshes user-to-groups mappings |
-refreshSuperUserGroupsConfiguration |
Refreshes superuser proxy groups mappings |
-refreshCallQueue |
Reloads the call queue from config |
-refresh <host:ipc_port> <key> [arg1..argn] |
Triggers a runtime-refresh of the resource specified by |
-reconfig <datanode |namenode> <host:ipc_port> <start|status|properties> |
Starts reconfiguration or gets the status of an ongoing reconfiguration, or gets a list of reconfigurable properties. |
-printTopology |
Prints a tree of the racks and their nodes as reported by the NameNode |
-refreshNameNodes datanodehost:port |
For the given DataNode, reloads the configuration files, stops serving the removed block-pools and starts serving new block-pools |
-getVolumeReport datanodehost:port |
For the given DataNode, get the volume report |
-deleteBlockPool datanode-host:port blockpoolId [force] |
If |
-setBalancerBandwidth <bandwidth in bytes per second> |
Changes the network bandwidth used by each DataNode during HDFS block balancing. |
-getBalancerBandwidth <datanode_host:ipc_port> |
Gets the network bandwidth for the given DataNode (in bytes per second). |
-fetchImage <local directory> |
Downloads the most recent fsimage from the NameNode and saves it in the specified local directory |
-allowSnapshot <snapshotDir> |
Allows snapshots of a directory to be created. |
-disallowSnapshot <snapshotDir> |
Disallows snapshots of a directory to be created. |
-shutdownDatanode <datanode_host:ipc_port> [upgrade] |
Submits a shutdown request for the given DataNode |
-evictWriters <datanode_host:ipc_port> |
Makes the DataNode evict all clients that are writing a block. |
-getDatanodeInfo <datanode_host:ipc_port> |
Gets the information about the given DataNode |
-metasave filename |
Saves NameNode’s primary data structures to filename in the directory specified by the
|
-triggerBlockReport [-incremental] <datanode_host:ipc_port> [-namenode <namenode_host:ipc_port>] |
Triggers a block report for the given DataNode. |
-listOpenFiles [-blockingDecommission] [-path <path>] |
Lists all open files currently managed by the NameNode along with client name and client machine accessing them. |
-help [cmd] |
Displays help for the given command or all commands if none is specified |