ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 改进RavenDB的MapReduce性能

改进RavenDB的MapReduce性能

原创 Linux操作系统 作者:jieforest 时间:2012-08-22 14:25:59 0 删除 编辑
This is another stream of conciseness post, with me trying to figure out what is the best way to resolve a given problem.

Update: I ended up solving this in a drastically different way. I'll post about this later on. I am keeping this here because it is a good post about how I think about a problem.

A while ago, I posted a visual description of how Map/Reduce is supposed to work. That was while I was working on RavenDB map/reduce implementation, but that isn’t actually how the current RavenDB map/reduce works.

Instead, it works like this:

Map phase:

CODE:

for item in docs:
for result in reduce(map(item)):
Persist(item.id, result.key, result)And the reduce phase:

CODE:

for result in reduce(results):
WriteToIndex(result)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/301743/viewspace-741581/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: Adobe AIR 3.4版发布
请登录后发表评论 登录
全部评论

注册时间:2008-04-23

  • 博文量
    441
  • 访问量
    602351