文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Aggregation(Chapter 6 of MongoDB The Definitive Guild)

Aggregation(Chapter 6 of MongoDB The Definitive Guild)

时间:2010-10-12  来源:Ray Z

  MapReduce is the Uzi of aggregation tools. Everything described with count, distinct, and group can be done with MapReduce, and more. It is a method of aggregation that can be easily parallelized across multiple servers. It splits up a problem, sends chunks of it to different machines, and lets each machine solve its part of the problem. When all of the machines are finished, they merge all of the pieces of the solution back into a full solution.   MapReduce has a couple of steps. It starts with the map step, which maps an operation onto every document in a collection. That operation could be either “do nothing” or “emit these keys with X values.” There is then an intermediary stage called the shuffle step: keys are grouped and lists of emitted values are created for each key. The reduce takes this list of values and reduces it to a single element. This element is returned to the shuffle step until each key has a list containing a single value: the result.
相关阅读 更多 +
排行榜 更多 +
我爱点点学英语

我爱点点学英语

学习教育 下载
最高速公路赛车

最高速公路赛车

体育竞技 下载
公路赛车pro

公路赛车pro

体育竞技 下载