1)Hadoop官方网站:http://hadoop.apache.org/
2)Hadoop运行模式包括:本地模式、伪分布式模式以及完全分布式模式。
1)创建在hadoop-3.1.3文件下面创建一个wcinput文件夹
[atguigu@hadoop102 hadoop-3.1.3]$ mkdir wcinput
2)在wcinput文件下创建一个word.txt文件
[atguigu@hadoop102 hadoop-3.1.3]$ cd wcinput
3)编辑word.txt文件
[atguigu@hadoop102 wcinput]$ vim word.txt
hadoop yarn
hadoop mapreduce
atguigu
atguigu
4)回到Hadoop目录/opt/module/hadoop-3.1.3
5)执行程序
[atguigu@hadoop102 hadoop-3.1.3]$ hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.3.jar wordcount wcinput wcoutput
6)查看结果
[atguigu@hadoop102 hadoop-3.1.3]$ cat wcoutput/part-r-00000
看到如下结果:
atguigu 2 hadoop 2 mapreduce 1 yarn 1
HADOOP入门(4):使用(3)安装(3)Hadoop运行模式(1)本地运行模式(官方WordCount)
原文:https://www.cnblogs.com/qiu-hua/p/15228649.html