大道至简

http://blog.csdn.net/hguisu/article/details/7969757

1、map的输入

key: 文档 id   value: 文档内容

输出:

key  词:文档id

value  1

2.combine

输入  key  list<int>

输出: key: 词   value:   文档id:次数

3.reduce 对于每个词合并,他的

输入 :  词    list<文档id:词频>

输出     词    doc1:frq1

http://www.tuicool.com/articles/NNRRb2

mapreduce 倒排索引的建立的更多相关文章

  1. 【Hadoop离线基础总结】MapReduce倒排索引建立

    MapReduce倒排索引建立 求某些单词在文章中出现多少次 有三个文档的内容,求hello,tom,jerry三个单词在其中各出现多少次 hello tom hello jerry hello to ...

  2. 第3节 mapreduce高级:4、倒排索引的建立

    倒排索引建立 需求分析 需求:有大量的文本(文档.网页),需要建立搜索索引 最终实现的结果就是哪个单词在哪个文章当中出现了多少次 思路分析: 首选将文档的内容全部读取出来,加上文档的名字作为key,文 ...

  3. MapReduce ----倒排索引

    分别建立三个文件: file1txt file2.txt file3.txt 文件内容分别是: MapReduce is simple 和 MapReduce is powerful is simpl ...

  4. 大数据学习——mapreduce倒排索引

    数据 a.txt hello jerry hello tom b.txt allen tom allen jerry allen hello c.txt hello jerry hello tom 1 ...

  5. MapReduce中文翻译

    MapReduce:超大机群上的简单数据处理   摘要 MapReduce是一个编程模型,和处理,产生大数据集的相关实现.用户指定一个map函数处理一个key/value对,从而产生中间的key/va ...

  6. 第3节 mapreduce高级:2、3、课程大纲&共同好友求取步骤一、二

    第五天课程大纲:1.社交粉丝的数据分析:求共同好友2.倒排索引的建立3.自定义inputFormat合并小文件 4.自定义outputformat5.分组求topN6.MapReduce的其他补充 了 ...

  7. 使用MapReduce实现一些经典的案例

    在工作中,很多时候都是用hive或pig来自动化执行mr统计,但是我们不能忘记原始的mr.本文记录了一些通过mr来完成的经典的案例,有倒排索引.数据去重等,需要掌握. 一.使用mapreduce实现倒 ...

  8. ElasticSearch(十七)初识倒排索引

    现在有两条document: doc1:I really liked my small dogs, and I think my mom also liked them. doc2:He never ...

  9. elasticsearch倒排索引与TF-IDF算法

    elasticsearch专栏:https://www.cnblogs.com/hello-shf/category/1550315.html 一.倒排索引(Inverted Index)简介 在关系 ...

随机推荐

  1. Css 梯形图形 并添加文字

    HTML页面的代码: <body> <div style="width:500px;border:solid 1px #ccc;"> <div> ...

  2. Linq XML

    写得比较啰嗦,自己记载备用   1 public class XmlFunction   2     {   3         private static XDocument _doc = new ...

  3. Angularjs中编写指令模版

    angular.module('moduleName', []).directive( 'namespaceDirectiveName', [ function() { return { restri ...

  4. 2、Python djang 框架下的word Excel TXT Image 等文件的下载

    2.python实现文件下载 (1)方法一.直接用a标签的href+数据库中文件地址,即可下载.缺点:word excel是直接弹框下载,对于image txt 等文件的下载方式是直接在新页面打开. ...

  5. javascrip 分享到

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  6. js获取星期几

    function getweek(time) { /*显示星期*/ /*time为date格式*/ var str; var d = time.getDay(); switch (d) { case ...

  7. #Leet Code# Binary Tree Max[待精简]

    描述:递归调用,getMax返回 [节点值,经过节点左子节点的最大值,经过节点右节点的最大值],每次递归同时查看是否存在不经过节点的值大于max. 代码:待优化 def getLargeNode(se ...

  8. adb找不到设备

    提示信息如下所示: adb server is out of date.killing... adb server didn't ACK *failed to start daemon * error ...

  9. 关于applicationx/www-form-urlencoded和multipart/form-data的描述

    在Form元素的语法中,EncType表明提交数据的格式 用 Enctype 属性指定将数据回发到服务器时浏览器使用的编码类型. 下边是说明: application/x-www-form-urlen ...

  10. css3:user-select属性

    一.user-select简介 这是在css3 UI规范中新增的一个功能,用来控制内容的可选择性 二.user-select:值 auto——默认值,用户可以选中元素中的内容 none——用户不能选择 ...