I agree with Avery, aggregator should answer both your questions. Just pay
attention that aggregator is run both on workers and on master so it should
be commutative and associative.
On Monday, January 2, 2012, Avery Ching <ach...@apache.org> wrote:
> There is support that Claudio added for exporting aggregator values (
https://issues.apache.org/jira/browse/GIRAPH-10). You could probably also
do your final computation there if that is what you want (if you want to do
end of application manipulation). WorkerContext would be a good way to do
aggregator manipulation in between supersteps (or at the end), as you
suggested as well. Is the manipulation you want to do in between
supersteps or just at the end of the application?
> On 1/2/12 6:05 AM, Sebastian Schelter wrote:
>> I'm working on an algorithm that computes a global value of the graph
>> (its so called effective diameter) and I have an Aggregator with which
>> this value can be computed. What would be the correct place to implement
>> this computation?
>> I thought about WorkerContext first, but it seems that this is run on
>> each worker, which doesn't really fit my problem. Another question would
>> be how to persist that global value after the algorithm is done.