参考链接 http://hadoop.apache.org/common/docs/stable/mapred_tutorial.html http://blog.endlesscode.com/2010/06/16/simple-demo-of-mapreduce-in-java/ When you run a hadoop jar this is the command which you should run in the directory you put the jar in (e.g…
看了下MapReduce的例子.再看了下Mapper和Reducer源码,理清了参数的意义,就o了. public class Mapper<KEYIN, VALUEIN, KEYOUT, VALUEOUT> public class Reducer<KEYIN,VALUEIN,KEYOUT,VALUEOUT> Map是打散过程,把输入的数据,拆分成若干的键值对.Reduce是重组的,根据前面的键值对,重组数据. 自己写Map/Reduce的话,理解了如何拆分数据.组装数据,理解了…