MapReduce Learn Test

xiaoxiao2021-02-28  83

What is MapReduce and Why

Processing Pattern

Hadoop

Algorithms in MapReduce

Tutorial

#!/usr/bin/env python import 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 #删除前导和尾随空格

转载请注明原文地址: https://www.6miu.com/read-85480.html

最新回复(0)