Get the App
SLTechnology News&Howtos  ›  Servers  › 

What are the common commands in Hadoop

Shulou Source: shulou.com Published: 2022-06-01 02:55:13 09月22日 Update

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

Tags: Files directories results contents commands frequently used articles copies folders more root directory recursion good practical lieutenant general name size copy article date Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Redmi Shulou Technology Linux MySQL