Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Run word statistics through the demo that comes with hadoop

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

1) mkdir input

2) cd intput

3) echo "hello word" > file1.txt

4) echo "hello Hadoop" > file2.txt

5) echo "hello mapreduce" > > file2.txt

6) more file2.txt

7) hadoop fs-mkdir / wc_input

8) hadoop fs-ls /

9) hadoop fs-put ~ / input/fi* / wc_input

10) hadoop fs-ls / wc_input

11) hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.3.jar wordcount / wc_input / output

12) hadoop fs-ls / output

13) hadoop fs-cat / output/part-r-00000

Screenshot of the execution result:

Tags: Screenshot result word Statistics run Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL NVidia Docker Huawei macOS