随笔分类 -  mapreduce

hadoop-streaming 配置之---参数分割
摘要:map:-D stream.map.output.field.separator=. 定义mapoutput字段的分隔符为. 用户可以自定义分隔符(除了默认的tab)-D stream.num.map.output.key.fields=4 第四个.前面的是key,后面的是value。如果该行.... 阅读全文

posted @ 2015-01-08 12:05 雨渐渐 阅读(620) 评论(0) 推荐(0) 编辑

mapreduce (六) MapReduce实现去重 NullWritable的使用
摘要:习题来源:http://www.cnblogs.com/xia520pi/archive/2012/06/04/2534533.htmlfile12012-3-1 a2012-3-2 b2012-3-3 c2012-3-4 d2012-3-5 a2012-3-6 b2012-3-7 c2012-3-... 阅读全文

posted @ 2014-03-17 10:46 雨渐渐 阅读(3886) 评论(0) 推荐(0) 编辑

mapreduce (五) MapReduce实现倒排索引 修改版 combiner是把同一个机器上的多个map的结果先聚合一次
摘要:(总感觉上一篇的实现有问题)http://www.cnblogs.com/i80386/p/3444726.html combiner是把同一个机器上的多个map的结果先聚合一次现重新实现一个:思路:第一个mapreduce仅仅做 的统计,即某个单词在某一篇文章里出现的次数。(原理跟wordc... 阅读全文

posted @ 2014-03-14 11:31 雨渐渐 阅读(698) 评论(0) 推荐(0) 编辑

mapreduce (四) MapReduce实现Grep+sort
摘要:1.txtdong xi chengxi dong chengwo ai beijingtian an menqichedongdongdong2.txtdong xi chengxi dong chengwo ai beijingtian an menqichedongdongdongimport... 阅读全文

posted @ 2014-03-13 16:40 雨渐渐 阅读(853) 评论(0) 推荐(0) 编辑

mapreduce (七) 几个实例
摘要:http://hi.baidu.com/hzd2712/item/d2465ae65270ab3e4cdcaf55MapReduce几个典型的例子 在Google的《MapReduce: Simpli ed Data Processing on Large Clusters》论文中,作者... 阅读全文

posted @ 2014-03-11 15:06 雨渐渐 阅读(581) 评论(0) 推荐(0) 编辑

mapreduce (三) MapReduce实现倒排索引(二)
摘要:hadoop apihttp://hadoop.apache.org/docs/r1.0.4/api/org/apache/hadoop/mapreduce/Reducer.html改变一下需求:要求“文档词频列表”是经过排序的,即 出现次数高的再前思路:代码:package proj;import... 阅读全文

posted @ 2013-12-05 14:10 雨渐渐 阅读(595) 评论(4) 推荐(0) 编辑

mapreduce (二) MapReduce实现倒排索引(一) combiner是把同一个机器上的多个map的结果先聚合一次
摘要:1 思路:0.txt MapReduce is simple1.txt MapReduce is powerfull is simple2.txt Hello MapReduce bye MapReduce1 map函数:context.write(word:docid, 1) 即将word:doc... 阅读全文

posted @ 2013-11-27 00:41 雨渐渐 阅读(469) 评论(0) 推荐(0) 编辑

mapreduce (一) 物理图解+逻辑图解
摘要:InputFormat类:该类的作用是将输入数据转换为map函数的输入数据。通过job.setInputFormatClass()方法进行设置,默认是TextInputFormat,将文本文件分成split(多行),由于测试数据较小,所以每个文本作为一个split了。并通过LineRecoderRe... 阅读全文

posted @ 2012-09-03 16:11 雨渐渐 阅读(338) 评论(0) 推荐(0) 编辑

导航