incubator-giraph-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Heitmann <benjamin.heitm...@deri.org>
Subject Re: Error in instantiating custom Vertex class via InternalVertexRunner.run
Date Mon, 05 Mar 2012 17:12:26 GMT

On 2 Mar 2012, at 23:15, Avery Ching wrote:

> If I'm reading this right, you're using a public abstract class for the vertex.  The
vertex class must be instantiable and cannot be abstract.
> 
> Hope that helps,


Thanks, that was the right issue to point out. I removed the "abstract" keyword, which solved
the issue. 
(Of course, then I found lots of other bugs in my code... ;) 


After adding the abstract keyword, I ran into some problems in overriding "package private
methods" of BasicVertex. 
Almost all of the abstract methods in BasicVertex are declared as public, e.g.   public abstract
Iterable<M> getMessages();

However, there are two methods which do not have the public keyword: 
abstract void putMessages(Iterable<M> messages);
abstract void releaseResources();

I am guessing that this inconsistency is just on oversight. 

However, if I understood everything correctly, then this provides problems for developers
who want to implement BasicVertex 
*outside* of the Giraph source tree. As the public keyword is missing, it is not possible
to override these two method signatures
from another package. The result, is that if I do not need IntIntNullIntVertex, but instead
IntMyStateNullIntVertex which implements BasicVertex, 
then I will need to either copy BasicVertex to my own project, or I need to copy IntMyStateNullIntVertex
to my local Giraph source tree. 


Is that the right reasoning, or is there some other pattern for using BasicVertex which I
missed ? 

Should I file a bug report somewhere ? 


cheers, Benjamin. 



Mime
View raw message