giraph-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ameya Vilankar <>
Subject Re: RandomVertexId
Date Mon, 16 Dec 2013 21:11:32 GMT
There are several ways of doing this.

If you know you vertex Ids lie between a certain range of values like from
0 - (some value). Then you can simple generate a random value in that range
and call sendMessage to send message to the randomly selected vertex.
However, if your vertices do not lie in a certain range and you try sending
a value to a non-existent vertex, giraph will automatically create the
vertex(to the best of my knowledge.).

A simpler way is have every vertex send its id to an aggregator and that
will accumulate an array of all vertex ids which will be available next
superstep to all the other vertices. Then they can randomly select a vertex
id and send a message. But again, if you have millions of vertices , you
would run into scalability problems with array of vertex ids growing too
large. A simpler alternative is to send a random message to the existing
edges of the vertex because to already have access to it.


On Mon, Dec 16, 2013 at 7:41 AM, Pushparaj Motamari

> Hi,
> In a compute method I would like to send message to a random vertex, how
> could I able to get random vertexid?
> Thanks
> Pushparaj

View raw message