Thanks for the comments. One thing I'm not sure about is whether using
master aggregator is a good approach, since I'm not as familiar to
giraph as you guys are.

The simple hack I've done in the computePartition() is adding
something like: int wakeUpAll =
((IntWritable)(graphState.getWorkerAggregatorUsage().getAggregatedValue("SPECIAL.wakeUpAll"))).get().
The vertices will be awakened if (vertex.isHalted() &&
(!Iterables.isEmpty(messages) || wakeUpAll == 1)). To offer a general
MasterCompute.wakeUpAll() method, this special aggregator should be
initialized in BspServiceMaster.runMasterCompute() along with the
user-defined initialize() method.

The other approach I'm thinking of is using zookeeper, since the
haltComputation boolean is also maintained in zookeeper. Following
this approach, the wakeUpAll boolean will be read from zookeeper by
BspServiceWorker in its startSuperstep(), and the value can then be
retrieved with serviceWorker.getWakeUpAll() in computePartition().

Which one do you think is better? Thanks.

On Thu, Mar 14, 2013 at 3:41 PM, Eli Reisman <[email protected]> wrote:
> +1 good idea! The rename Avery suggested would be nice too!
>
>
>
> On Tue, Mar 12, 2013 at 11:52 AM, Avery Ching <[email protected]> wrote:
>
>> There is already a haltComputation() method for the master computation for
>> the inverse operation.
>>
>> Would be nice to have the inverse method you suggest and rename the
>> methods to be more descriptive.  Maybe
>>
>> endApplication() - less ambiguous than haltComputation() I think.
>> voteToHalt has a different effect than ending the application.
>> wakeUpAllVertices() - similar to wakeUp() in Vertex.
>>
>> This would be a pretty easy feature to add.  I don't see why not. Go for
>> it!
>>
>> Avery
>>
>>
>> On 3/12/13 9:57 AM, Jiadong Wu wrote:
>>
>>> Hi All,
>>>
>>> Currently in my project, the master has to wake up all halted vertices
>>> when certain conditions are met. To do this I actually hacked a little
>>> bit of org.apache.giraph.graph.**ComputeCallable.**computePartition. So
>>> that the computing thread can read a special aggregator set up by the
>>> master and then decide whether all the halted vertices should be woken
>>> up. Is there any neater approach for doing it? Or, if there isn't,
>>> should we implement such method?
>>>
>>> Regards,
>>>
>>
>>

Reply via email to