You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function map(String name, String document):
// name: document name
// document: document contents
for each word w in document:
emit (w, 1)
function reduce(String word, Iterator partialCounts):
// word: a word
// partialCounts: a list of aggregated partial counts
sum = 0
for each pc in partialCounts:
sum += pc
emit (word, sum)
//from wikipedia
c语言指针跟数组的区别——和mapreduce的思想
c语言数组跟指针的区别
关键要知道每个符号的地址在编译时可知。所以如果编译器需要地址加上偏移量这种操作就可以直接进行操作,比如数组。相反,指针必须在运行的时取得它当前值,然后才能进行应用操作。
定义为指针但以数组方式引用
定义为数组但以指针的方式引用
声明extern char *p;却定义是char p[10],当用P[10]这种形式提取这个声明内容时,实际上得到是一个字符。但按照上面的方法,编译器却把它当做是一个指针把ascii字符解释为地址显然是牛头不对马嘴。
以上内容来自expert c programming
MapReduce
find friend example
按照我的理解,MapReduce有个map函数,和一个reduce函数,他们接受的参数也是一定的,跟状态没有关系,而且返回时key-value也跟状态没有关系,这样就可以在分布式里运用消息队列和键值数据库。
The text was updated successfully, but these errors were encountered: