You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by jerome richard <je...@msn.com> on 2013/07/15 17:48:08 UTC

Probable bug when the vertex data class constructor contains a parameter

Hello,
I write a Giraph application where nodes contains data and so the Vertex class used look like : Vertex<LongWritable, VertexData, NullWritable>
When the VertexData contains a constructor with no arguments, my application works. But when I try to add an argument to the constructor a kind of bug appear. The compilation succeeds, but during the execution, Giraph does nothing and seems to wait indefinitely something. No error occur.Notice that the first super-step (N°0) is not reached.Can you shed some light on this?
Regards.
 		 	   		  

Re: Probable bug when the vertex data class constructor contains a parameter

Posted by Alessandro Presta <al...@fb.com>.
Hi Jerome,

Vertex value classes need an empty constructor because Giraph needs to instantiate them on its own, for example when deserializing a request containing vertices read by another worker during input.
You can still have another constructor with parameters, that you can explicitly call in your input format.
If you need something more complex, you can define a VertexValueFactory, which has access to the configuration.

Alessandro

On Jul 15, 2013, at 8:48 AM, "jerome richard" <je...@msn.com>> wrote:

Hello,

I write a Giraph application where nodes contains data and so the Vertex class used look like : Vertex<LongWritable, VertexData, NullWritable>

When the VertexData contains a constructor with no arguments, my application works. But when I try to add an argument to the constructor a kind of bug appear. The compilation succeeds, but during the execution, Giraph does nothing and seems to wait indefinitely something. No error occur.
Notice that the first super-step (N°0) is not reached.
Can you shed some light on this?

Regards.