飞鸟博客

导航

实训任务04 MapReduce编程入门

实训任务04 MapReduce编程入门

1.实训1:画图mapReduce处理过程

         使用有短句“A friend in need is a friend in deed”,画出使用MapReduce对它进行词频统计的过程,主要展示Map阶段与Reduce阶段的处理过程。请画图展示。

2 .实训2:编程

参考wordCount词频统计源代码,试编写一个MapReduce程序,统计hadoop.txt文件中的关键词Hadoop出现的次数。

----------------------------------------------样文 hadoop.doc的内容----------------------------

The Hadoop documentaion includes the information you nced to get started using Hadop.Begin wihthe Single Node Scup which shows you how to set upa ingle-node Hadop nstlaion Then move onlothe Chuster Sctup 10 lcam how to setup mulbi-node Hadoop insallation. 

操作步骤:

  1. 打开eclipse,新建MapReduce工程;
  2. 参考上面单词计数代码编写程序;
  3. 使用eclipse的Export-> JAR file工具打包成jar包,上传至master并运行;
  4. 查看输出结构:终端输出信息、Job任务监控、HDFS输出信息;

 

posted on 2018-10-07 21:17  飞鸟博客  阅读(684)  评论(0编辑  收藏  举报