Riak Post-Commit Hooks在哪里运行?

时间:2011-11-21 17:47:11

标签: erlang mapreduce commit riak

我正在尝试使用Riak的Post-Commit Hook来评估构建基于MapReduce的分布式增量索引,但是想知道Post-Commit Hook实际运行哪些Riak节点。它们是在客户端用于提交提交的节点上运行,还是在持久保存数据的主节点上运行?如果是后者,我想我可以从那里有效地做一个地图或减少并从输出中添加额外的记录。

1 个答案:

答案 0 :(得分:2)

来自docs

Post-commit hooks are run after the write has completed successfully.
Specifically,the hook function is called by riak_kv_put_fsm immediately
before the calling process is notified of the successful write 

riak_kv_put_fsm处理“Riak PUT请求的协调”,因此post commit hook在协调器节点上运行,即客户端发送put的节点。