摘要:
思路:使用两次MapReduce,第一次MapReduce产生的文件是第二次MapReduce的输入
第一次MapReduce:使用WordCount,统计文件单词,outputKey是word->file.txt,outputValue是count
第二次MapReduce:
Map思路:k1 是Object, v1是每行数据word->file.txt \t count,k2是word,v2是file.txt->count
Reduce思路:k1,v1与Mapper的output一致,k2是word,v2是file1.txt->count1,file2.txt->count2,...... 阅读全文