第1关:MapReduce排序-倒排序索引
任务描述
本关任务:统计出每个单词出现的文档路径及词频数。
相关知识
倒排序索引概述
“倒排索引”是文档检索系统中最常用的数据结构,被广泛地应用于全文搜索引擎。 它主要是用来存储某个单词(或词组)在一个文档或一组文档中的存储位置的映射,即提 供了一种根据内容来查找文档的方式。由于不是根据文档来确定文档所包含的内容,而是进行相反的操作,因而称为倒排索引。
简单来说根据单词,返回单词在哪个文件中出现过,而且频率是多少的结果。
文件格式说明以及文件内容
本实训编程所用到的输入文件格式为 txt 格式,文件名为input1.txt,input2.txt,input3.txt。
input1.txt文件内容:
MapReduce is easy to learn MapReduce is a programming model MapReduce parallel computing of large data sets MapReduce is a cluster based high performance parallel computing platform It allows common commercial servers on the market to form a distributed and parallel computing cluster with dozens hundreds to thousands of nodes.
input2.txt文件内容:
MapReduce is easy to operate MapReduce is easy to understand MapReduce is a computing model framework and platform paral