HDFS CLI
Overview
This section includes the reference documentation for the HDFS shell CLI.
Using hdfs
commands without any arguments outputs a description for all these commands.
The usage is as follows:
$ hdfs [SHELL_OPTIONS] COMMAND [GENERIC_OPTIONS] [COMMAND_OPTIONS]
Hadoop has an option parsing framework that employs parsing generic options as well as running classes.
SHELL_OPTIONS |
The common set of shell options |
GENERIC_OPTIONS |
The common set of options supported by multiple commands |
COMMAND_OPTIONS |
Various commands with their options are described in the following sections |
User commands
These commands are helpful for users of a Hadoop cluster.
Command | Description |
---|---|
Prints the class path needed to get the Hadoop JAR and the required libraries |
|
Runs a filesystem command on the file system supported in Hadoop |
|
Displays computed Hadoop environment variables |
|
Gets Delegation Token from a NameNode |
|
Runs the HDFS filesystem checking utility |
|
Gets configuration information from the configuration directory, post-processing |
|
Returns the group information given one or more usernames |
|
Runs HttpFS server, the HDFS HTTP Gateway |
|
Gets the list of snapshot table directories |
|
Dumps JMX information from a service |
|
Hadoop offline edits viewer |
|
Hadoop Offline Image Viewer for image files |
|
Hadoop Offline Image Viewer for older versions of Hadoop |
|
Determines the difference between HDFS snapshots |
|
Prints the version |
Administration commands
These commands are useful for administrators of a Hadoop cluster.
Command | Description |
---|---|
Runs a cluster balancing utility |
|
Interacts with cache pools and directives via the hdfs cacheadmin subcommand |
|
Creates a new encryption zone |
|
Runs an HDFS DataNode |
|
Runs an HDFS dfsadmin client |
|
Runs the DFS router |
|
Manages Router-based federation |
|
Runs the disk balancer CLI |
|
Runs the ErasureCoding CLI |
|
Gets access to some additional commands to administer the HA HDFS cluster |
|
Starts a JournalNode for use with HDFS HA with QJM |
|
Runs the data migration utility |
|
Runs the NameNode |
|
Starts the NFS3 gateway for use with the HDFS NFS3 Service |
|
Starts the RPC portmap for use with the HDFS NFS3 Service |
|
Runs the HDFS secondary NameNode |
|
Lists out all/gets/sets/unsets storage policies |
|
Starts a ZooKeeper Failover Controller process for use with HDFS HA with QJM |