MapReduce Learn Test

来源:互联网 发布:淘宝九一一正品折扣店 编辑:程序博客网 时间:2024/06/05 16:50

What is MapReduce and Why

这里写图片描述

Processing Pattern

这里写图片描述

Hadoop

这里写图片描述

Algorithms in MapReduce

这里写图片描述

Tutorial

#!/usr/bin/env pythonimport sys#--- get all lines from stdin ---for line in sys.stdin:    #--- remove leading and trailing whitespace ---    line = line.strip()    #--- split the line into words ---    words = line.split()    #--- output tuples [word, 1] in tab-delimited format ---    for word in words:        print '%s\t%s' % (word,"1")

Remove leading and trailing whitespace #删除前导和尾随空格

0 0
原创粉丝点击