# mapreduce-practice-02 **Repository Path**: skiinder/mapreduce-practice-02 ## Basic Information - **Project Name**: mapreduce-practice-02 - **Description**: 一道mapreduce练习题 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-11-30 - **Last Updated**: 2023-03-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Mapreduce练习02——倒排索引 ### 练习需求: 请编写一个mapreduce程序,实现倒排索引功能。 输入:若干随机生成的全部是单词的文件,单词之间用空格分隔,输入文件夹为 input 例如: a.txt ```text apple apple ``` b.txt ```text apple apple ``` c.txt ```text apple apple apple ``` 输出:每行两列,第一列为单词,第二列为单词在各个文件出现的次数,列与列之间用制表符分隔,第二列多个文件之间用逗号分隔。多个文件按照(频次降序,文件名升序)排序。例如: ```text apple c.txt:3,a.txt:2,b.txt:2 ``` 要求输出到 output/practice 目录 ### 使用说明: 1. 在**com.atguigu.mapreduce.practice**包中编写MapReduce逻辑; 2. 在**com.atguigu.mapreduce.practice.PracticeDriver**的**run**方法中编写Driver逻辑,并根据执行结果返回0或1; 3. 在**com.atguigu.mapreduce.Runner**控制是否提交。 4. 运行