// todo
3.1 本地运行模式(官方WordCount)
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
保存退出::wq
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
3.2 完全分布式运行模式(开发重点)
分析:
1)准备3台客户机(关闭防火墙、静态IP、主机名称)
2)安装JDK
3)配置环境变量
4)安装Hadoop
5)配置环境变量
6)配置集群
7)单点启动
8)配置ssh
9)群起并测试集群
06 | Hadoop运行模式
最新推荐文章于 2025-12-27 14:16:20 发布
1949

被折叠的 条评论
为什么被折叠?



