Jake Mannix commented on GIRAPH-27:

Ok, looking great.  Applied patch and merged into my primitive test, and found 
a couple of things: 

  * BasicVertex#getNumEdges(), getNumVertices(), and getSuperstep() are all 
delegating to GraphState, so they should be implemented in the base class, 
instead of left abstract, or else subclasses which aren't subclasses of Vertex 
will be duplicating these getters unncessesarily

  * we're still not free from Vertex as a base: BspUtils#createVertex() and 
getVertexClass() still assume subclasses of Vertex.  Similarly, 
VertexResolver#intantiateVertex() needs to return a *mutable* vertex.  When is 
it allowed to subclass BasicVertex, and when must you subclass MutableVertex?  
If you're not mutable, you don't need to worry about being instantiated by the 
VertexResolver, so a class cast is acceptable?

> Mutable static global state in Vertex.java should be refactored
> ---------------------------------------------------------------
>                 Key: GIRAPH-27
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-27
>             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
> Vertex.java 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: http://www.atlassian.com/software/jira


Reply via email to