giraph-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Etienne Dumoulin <>
Subject How to use an aggregator to halt ?
Date Sun, 22 Jul 2012 20:16:48 GMT
Hi everyone,

I implement a pagerank very similar to the one given
in the example package.

However I would like to do a halt condition with an aggregator:
I am calculating the sum of all the vertex values at each step.
I am stopping when the average of the difference is bellow a certain

So I have extended a WorkerContext class. It does not look like
I can stop the process from the method postSuperStep(), so I try
to set a boolean somewhere readable by the vertex.
Where can I set it?

-I tried to do a getWorkerContext, cast into my type and then call my own
if ( ((MyWorkerContext)getWorkerContext()).isEnd();
    ) {

-I tried to set a boolean into the Configuration from the WorkerContext and
get it back into the Vertex.
if ( getWorkerContext().getContext().getConfiguration().getBoolean("end",
    ) {



View raw message