1 建立项目

下载见附件:

https://download.csdn.net/upload/success

导出jar:

  HdfsDemo-1.0-SNAPSHOT.jar  

2 建立测试1.txt

hello
hello
world
hahah
how

上传到hadoop上:

hdfs dfs -mkdir -p /user/centos/wc/data

hdfs dfs -put 1.txt wc/data

3 测试脚本

 hadoop jar HdfsDemo-1.0-SNAPSHOT.jar com.it18zhang.hdfs.mr.WCApp hdfs://s200/user/centos/wc/data hdfs://s200/user/centos/wc/data

4 查看进度

http://192.168.77.200:8088/cluster/apps/RUNNING

Mapreduce ----完全分布式WorldCount 示例

Mapreduce ----完全分布式WorldCount 示例

5 查看深成统计文本

hdfs dfs -cat /user/centos/wc/data/out/part-r-00000

Mapreduce ----完全分布式WorldCount 示例

相关文章:

  • 2021-08-28
  • 2021-04-06
  • 2021-07-14
  • 2021-05-23
  • 2021-09-25
  • 2021-09-07
  • 2022-01-02
  • 2021-07-19
猜你喜欢
  • 2021-09-23
  • 2021-04-02
  • 2021-10-17
  • 2022-12-23
  • 2021-11-19
  • 2021-11-19
相关资源
相似解决方案