giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jake Mannix (Commented) (JIRA)" <>
Subject [jira] [Commented] (GIRAPH-36) Ensure that subclassing BasicVertex is possible by user apps
Date Tue, 18 Oct 2011 21:15:10 GMT


Jake Mannix commented on GIRAPH-36:

Hey Claudio,

  The reason why this has been slow going is exactly your last line: MutableVertex is a bit
of a beast - it's essentially assumed that all vertex implementations are a subclass of Vertex
extends MutableVertex, which is the whole point of this ticket.  The readField() method and
the VertexInputFormats can be modified, and that's what I've been working on: they essentially
are designed currently to pretend you're reading from raw Text and calling setters on the
(Mutable)Vertex you've instantiated.  But the more sensible thing is to have the BasicVertex
implement Writable, which lets it read in data in BspServiceWorker, but also implement an
interface which lets it read lines of Text, say, and initialize that way, if it's not a MutableVertex.

  Its a little ugly, maybe there are better ways.

  You were suggesting just force everyone to be MutableVertex?  I think the idea of having
a distinction is good - there may be optimizations possible in the case where you know your
graph will never change in structure after instantiation (a very common case, for most graph
algorithms).  The trick is the "after instantiation" part.
> Ensure that subclassing BasicVertex is possible by user apps
> ------------------------------------------------------------
>                 Key: GIRAPH-36
>                 URL:
>             Project: Giraph
>          Issue Type: Improvement
>          Components: graph
>    Affects Versions: 0.70.0
>            Reporter: Jake Mannix
>            Assignee: Jake Mannix
>            Priority: Blocker
>             Fix For: 0.70.0
> Original assumptions in Giraph were that all users would subclass Vertex (which extended
MutableVertex extended BasicVertex).  Classes which wish to have application specific data
structures (ie. not a TreeMap<I, Edge<I,E>>) may need to extend either MutableVertex
or BasicVertex.  Unfortunately VertexRange extends ArrayList<Vertex>, and there are
other places where the assumption is that vertex classes are either Vertex, or at least MutableVertex.
> Let's make sure the internal APIs allow for BasicVertex to be the base class.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message