Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Hadoop shell

Shulou Source: shulou.com Published: 2022-06-03 05:03:41 11月25日 Update

1. View help

Hadoop fs-help

2. Upload

Hadoop fs-put

Such as hadoop fs-put test.log /

3. View the contents of the file

Hadoop fs-cat

For example: hadoop fs-cat / test.log

4. View the list of files

Hadoop fs-ls /

5. Download the file

Hadoop fs-get

6. Create a directory: hadoop fs-mkdir

Such as hadoop fs-mkdir / myDir

7. Delete the file: hadoop fs-rm-r

8. Execute jar: such as the wordcount program that comes with hadoop.

Hadoop jar hadoop-mapreduce-examples-2.4.1.jar wordcount/ wordcount/in / wordcount/out

The execution result is as follows:

Tags: Files contents directories programs results help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MySQL macOS Shulou Information NVidia