Inline responses. We look forward to hearing about your work Benjamin!
On 3/5/12 9:12 AM, Benjamin Heitmann wrote:
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... ;)
Glad to hear it.
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.
Actually, it is not. =) So the issue is that if we do make these
methods not package-private (i.e. protected/public), then when a user
subclasses a vertex, they will be able to shoot themselves in the foot
by calling these methods which are only meant for internal use. Any
other suggestions are welcome.
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 BasicVe
Is that the right reasoning, or is there some other pattern for using
BasicVertex which I missed ?
Should I file a bug report somewhere ?