1、启动已经搭建好的hdfs集群:start-dfs.sh
2、打开web端http://www.fxb1:50070/
3、将事先写好的mapreducer打成jar包

代码部分
Mapper部分
WordCount的MapReduce用法
reducer部分
WordCount的MapReduce用法
main主类
WordCount的MapReduce用法4、打jar包
WordCount的MapReduce用法
WordCount的MapReduce用法
WordCount的MapReduce用法
WordCount的MapReduce用法
WordCount的MapReduce用法
5、上传到集群运行
(1)上传要处理的数据a.txt b.txt
hadoop fs -put a.txt /user/fxb1/input/
hadoop fs -put b.txt /user/fxb1/input/
(2)上传jar包
hadoop jar test.jar input output(input–>未处理数据存放位置,output处理后数据存放位置)
(3)查看结果(略)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-16
  • 2021-09-03
  • 2021-06-11
  • 2021-11-23
  • 2022-12-23
猜你喜欢
  • 2021-05-17
  • 2021-11-19
  • 2021-07-04
  • 2021-07-28
  • 2021-10-29
  • 2021-06-23
相关资源
相似解决方案