incubator-giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jake Mannix (JIRA)" <>
Subject [jira] [Commented] (GIRAPH-27) Mutable static global state in should be refactored
Date Fri, 09 Sep 2011 04:17:08 GMT


Jake Mannix commented on GIRAPH-27:

Maybe the right thing is yes, to have an AbstractVertex base class which implements BasicVertex,
but also has a pair of package-protected final methods for get/setGraphState(), so that GraphMapper
can use it, but that way subclasses in user-packages can't see it.

But then you'd need to require that users always subclassed that, or else they'd run into
the issue I had, that it would compile, but not run.

Maybe the right approach is to turn BasicVertex into an abstract class, and have the package-protected
method there, and get rid of the interface at all.  Then all users would be required to subclass
BasicVertex, instead of implement it.  They already have to extend Vertex, so this just makes
it clear what they have to extend.

> Mutable static global state in should be refactored
> ---------------------------------------------------------------
>                 Key: GIRAPH-27
>                 URL:
>             Project: Giraph
>          Issue Type: Improvement
>          Components: graph
>    Affects Versions: 0.70.0
>            Reporter: Jake Mannix
>            Assignee: Jake Mannix
>         Attachments: GIRAPH-27.patch, GIRAPH-27.patch
> has a bunch of static methods for getting/setting global graph state (total
number of vertices, edges, a reference to the GraphMapper, etc).  Refactoring this into a
GraphState object, which every Vertex can hold onto a reference to (yes, a tiny bit more memory
per Vertex, but in comparison to what's already in there...)

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message