2011-11-21 111 views
7

我試圖評估使用Riak的後提交掛鉤來建立一個分佈式的,增量的基於MapReduce的索引,但想知道哪個Riak節點的後提交掛鉤實際上運行。它們是運行在客戶端用於放置提交的節點上,還是運行在數據被保留的主節點上?如果是後者,我想我可以從那裏有效地做一個地圖或減少,並從輸出中添加額外的記錄。Riak Post-Commit掛鉤在哪裏運行?

回答

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請求的協調」,所以後提交掛鉤在統籌節點上運行,即客戶端發送的付諸節點。

+0

快速問題:有沒有辦法讓post commit hook異步執行? – arijeet