Hi Gabor, the vertex-centric iteration implements the Pregel model, according to which a vertex is "active" during a superstep only when there are messages for this vertex. So, the behavior you are seeing is intended, yes :-)
The logic behind this is that a vertex value gets updated by performing some computation on the received messages. Thus, there would be no vertex update if there are no new messages. If you want to keep a vertex active even when there are no messages sent to it, you could have it send a dummy message to itself. However, if your algorithm requires all vertices to be active in all supersteps, then you are probably looking for a bulk iteration instead. Since you're mentioning that you're implementing triangle counting, note that with Gelly you don't need to implement this as an iterative algorithm. Actually, it is probably a bad idea. In a system like Giraph, you don't have another choice because everything has to follow the Pregel model and be expressed as a series of supersteps. However, triangle counting is not an iterative algorithm; it consists of well-defined steps which you can express with the neighborhood and join functions of Gelly. Finally, you might want to take a look at the Flink examples. There are two implementations of triangle count there :-) Cheers, -Vasia. On 16 April 2015 at 21:44, Hermann Gábor <reckone...@gmail.com> wrote: > Hi all, > > I am implementing a simple triangle counting example for a workshop with > vertex-centric iteration and I found that the updateVertex method only gets > called if there are new messages for that vertex. Is it the expected > behavior? > > I know that the iteration should stop for the given vertex when the we > don't change the vertex value but (at least in my case) it would be useful > if the updateVertex got called with an empty message iterator. I guess > receiving zero messages might have a meaning in other cases too, and the > user would like to update the vertex value. > Does changing the current behavior make sense? > > Cheers, > Gabor >