我MapReduce的工作与WORDCOUNT示例的值: 输入数据:输出减少一个密钥一起
text files
输出:
term: fileName occurrences
地图输出:
Term:filename 1 1 1 1 1
减少输出:
代码最终输出“减速机的输出”的3210Term: filename occurences
例子:
Iphone: file1 4
Iphone: file2 3
Galaxy: file1 2
Htc: file1 3
Htc file2 5
输出我想
Iphone: file1=4 file2=3
Galaxy: file1=2
Htc: file1=3 file2=5
我怎样才能得到这种情况下,我想过使用分区功能,把我不知道该怎么做?任何建议? 在此先感谢
代码输出示例 - 是您的映射器输出? –
@siddharthajain从减速机输出“最终输出” – user5532529
你在地图输出中的关键是什么,它的格式是什么? –