You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by David Gainer <dg...@bbn.com> on 2013/06/04 07:04:26 UTC

Restarting Algorithm Pattern

I have an algorithm where I'd like to iterative over the vertices with a
configuration variable set to some value.  Then, when all the vertices vote
to halt, I'd like to reduce the configuration variable and repeat the inner
iteration until some threshold of the configuration variable is reached.  I
was wondering what the natural way of programming that would be.  It seems
like a master Computing situation - but I didn't see any method for
un-halting vertices.  I also wasn't sure when A vertex would ever be able to
call its own wakeup function.  

 

Thanks,

 

David


Re: Restarting Algorithm Pattern

Posted by Avery Ching <ac...@apache.org>.
Currently aggregators are the only way that the master can communicate 
to the workers with user code.  If you have any suggestions for 
additional methods, we'd like to hear about it!

Avery

On 6/4/13 8:05 AM, David Gainer wrote:
>
> Thanks.  That does the trick.
>
> To set the variable in the master that the workers can see I'm using 
> an aggregator -- even though it doesn't do any aggregating.  It works 
> -- but is this
>
> the right way to go about that?
>
> *From:*Avery Ching [mailto:aching@apache.org]
> *Sent:* Tuesday, June 04, 2013 3:05 AM
> *To:* user@giraph.apache.org
> *Cc:* David Gainer
> *Subject:* Re: Restarting Algorithm Pattern
>
> Rather than use voteToHalt, you could add an Aggregator that kept 
> track of the "alive vertices" and then you can use an Aggregator to 
> store/set your configuration value that the Master computation can 
> modify. Do the logic in the Master computation and all should be well.
>
> Avery
>
> On 6/3/13 10:04 PM, David Gainer wrote:
>
>     I have an algorithm where I'd like to iterative over the vertices
>     with a configuration variable set to some value.  Then, when all
>     the vertices vote to halt, I'd like to reduce the configuration
>     variable and repeat the inner iteration until some threshold of
>     the configuration variable is reached.  I was wondering what the
>     natural way of programming that would be.  It seems like a master
>     Computing situation -- but I didn't see any method for un-halting
>     vertices.  I also wasn't sure when A vertex would ever be able to
>     call its own wakeup function.
>
>     Thanks,
>
>     David
>


RE: Restarting Algorithm Pattern

Posted by David Gainer <dg...@bbn.com>.
Thanks.  That does the trick.  

 

To set the variable in the master that the workers can see I'm using an
aggregator - even though it doesn't do any aggregating.  It works - but is
this 

the right way to go about that?

 

 

From: Avery Ching [mailto:aching@apache.org] 
Sent: Tuesday, June 04, 2013 3:05 AM
To: user@giraph.apache.org
Cc: David Gainer
Subject: Re: Restarting Algorithm Pattern

 

Rather than use voteToHalt, you could add an Aggregator that kept track of
the "alive vertices" and then you can use an Aggregator to store/set your
configuration value that the Master computation can modify.  Do the logic in
the Master computation and all should be well.

Avery

On 6/3/13 10:04 PM, David Gainer wrote:

I have an algorithm where I'd like to iterative over the vertices with a
configuration variable set to some value.  Then, when all the vertices vote
to halt, I'd like to reduce the configuration variable and repeat the inner
iteration until some threshold of the configuration variable is reached.  I
was wondering what the natural way of programming that would be.  It seems
like a master Computing situation - but I didn't see any method for
un-halting vertices.  I also wasn't sure when A vertex would ever be able to
call its own wakeup function.  

 

Thanks,

 

David

 


Re: Restarting Algorithm Pattern

Posted by Avery Ching <ac...@apache.org>.
Rather than use voteToHalt, you could add an Aggregator that kept track 
of the "alive vertices" and then you can use an Aggregator to store/set 
your configuration value that the Master computation can modify.  Do the 
logic in the Master computation and all should be well.

Avery

On 6/3/13 10:04 PM, David Gainer wrote:
>
> I have an algorithm where I'd like to iterative over the vertices with 
> a configuration variable set to some value.  Then, when all the 
> vertices vote to halt, I'd like to reduce the configuration variable 
> and repeat the inner iteration until some threshold of the 
> configuration variable is reached.  I was wondering what the natural 
> way of programming that would be.  It seems like a master Computing 
> situation -- but I didn't see any method for un-halting vertices.  I 
> also wasn't sure when A vertex would ever be able to call its own 
> wakeup function.
>
> Thanks,
>
> David
>