You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by Maja Kabiljo <ma...@fb.com> on 2013/07/01 17:04:12 UTC

Re: Are new vertices active?

Hi Christian,

As javadoc for getTotalNumVertices() says, it returns the number of vertices which existed in previous superstep, so newly created vertices are not going to be counted there.

In the code mutations are applied before the next superstep starts. The way it's currently implemented, vertices created during last superstep won't exist during output. That being said, I don't know if we wanted it that way, or it just turned out like that since nobody thought about that case.

Maja

From: Christian Krause <me...@ckrause.org>>
Reply-To: "user@giraph.apache.org<ma...@giraph.apache.org>" <us...@giraph.apache.org>>
Date: Thursday, June 27, 2013 4:59 AM
To: "user@giraph.apache.org<ma...@giraph.apache.org>" <us...@giraph.apache.org>>
Subject: Re: Are new vertices active?

Thank you, Claudio.

Regarding the last point: I am mutating the graph in superstep N, and in N+1 I am logging the total number of vertices and halt all nodes. When I am doing it like this, I don't get the updated number of vertices. However, if I wait one more superstep, I get the correct number. Strange..

Cheers,
Christian


2013/6/26 Claudio Martella <cl...@gmail.com>>
Hi,

inline are my (tentative) answers.


On Wed, Jun 26, 2013 at 6:34 PM, Christian Krause <me...@ckrause.org>> wrote:
Hi,

if I create new vertices, will they be executed in the next superstep? And does it make a difference whether I create them using addVertexRequest() or sendMessage()?

The vertex will be active. The case of a sendMessage is intuitive, because a message wakens up a vertex.


Another question: if I mutate the graph in superstep X and X is the last superstep, will the changes be executed? It is not clear to me whether the graph changes are executed during or before the next superstep.

I'm actually not sure about our internal implementation, somebody can shade light on this, but I'd expect it to be running due to above (presence of active vertices).


And related to the last question, if I mutate the graph in superstep X, and I call getTotalNumVertices() in the next step, can I expect the updated number of vertices, or the number of vertices before the mutation?

The mutatiations are applied at the end of a superstep and are visibile in the following one. Hence in s+1 you'd see the new number of vertices.


Sorry for these very basic questions, but I did not find any documentation on these details. If this is documented somewhere, it would be helpful to get a link.

Cheers,
Christian



--
   Claudio Martella
   claudio.martella@gmail.com<ma...@gmail.com>