What are the common commands in Hadoop
This article will explain in detail what Hadoop commands are commonly used, and the editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Hadoop common commands
1. Hadoop fs-ls to view the contents of the hdfs directory
View the hdfs root directory:
[root@chaoren bin] # hadoop fs-ls / Found 1 itemsdrwxr-xr-x-root supergroup 0 2014-11-29 22:25 / usr
The result is equivalent to
[root@chaoren bin] # hadoop fs-ls hdfs://chaoren:9000/Found 1 itemsdrwxr-xr-x-root supergroup 0 2014-11-29 22:25 / usr
2. Hadoop fs-lsr recursively view the contents of the hdfs directory
For example:
[root@chaoren bin] # hadoop fs-lsr / usr/local permissions copies user group file size modification date file name drwxr-xr-x-root supergroup 0 2014-11-29 22:25 / usr/local/hadoopdrwxr-xr-x-root supergroup 0 2014-11-29 22:25 / usr/local/hadoop/tmpdrwxr-xr-x-root supergroup 0 2014-11-29 22:25 / usr/local/hadoop/tmp/mapreddrwx--root supergroup 0 2014-11-29 22:25 / usr/local/hadoop/tmp/mapred/system-rw- 1 root supergroup 4 2014-11-29 22:25 / usr/local/hadoop/tmp/mapred/system/jobtracker.info
The number of copies is configured in hdfs-site.xml