giraph-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Presta <>
Subject Re: package-private methods in Vertex/BasicVertex
Date Wed, 01 Aug 2012 15:07:51 GMT
Hi Nick,

Thanks for pointing this out.
Here's a relevant discussion that was just recently started:
Hopefully we get this sorted out soon.


From: Nick West <<>>
Reply-To: "<>" <<>>
Date: Wednesday, August 1, 2012 3:48 PM
To: "<>" <<>>
Subject: package-private methods in Vertex/BasicVertex


There are several methods in Vertex/BasicVertex that are declared as abstract but without
any access modifier specified.  They are:

    abstract void putMessages(Iterable<M> messages);
    abstract void releaseResources();

This has the effect that they both have the access modifier package-private.  The effect of
this is that only classes in the giraph package that extend Vertex can override the method.
 Specifically, any Vertex implementation not in the giraph package cannot override these methods.

Is this the intended behavior?  I think an easy fix would to be to explicitly declare them
as protected, which would allow classes outside of the package to override these methods.

I've looked into using several of the other predefined vertex types (EdgeListVertex, HashMapVertex,
etc), which override these methods. However, in these classes the write and readFields methods
are declared final, limiting the amount of customization one can make to these classes.

If you have any alternative suggestions, I'd be happy to hear them.

Nick West

Benchmark Solutions
101 Park Avenue - 7th Floor
New York, NY 10178
Tel + | Mobile +1.646.267.4324 <>

View raw message