Jake Mannix commented on GIRAPH-28:

Also, to contradict my 1st and 3rd points, Dmitriy pointed out (in an 
out-of-band chat) that if we don't want to expose Edge to the user, because a) 
don't want to store it in memory (as his test showed that even switching 
TreeMap<I, Edge<I,E>> to TreeMap<I, E> reduced memory usage by a fair amount), 
and b) don't want to have to instantiate tons of useless objects by lazily 
creating them, we could instead just keep the getEdgeValue() and removeEdge() 
as they were, but also add a boolean hasEdge(I targetVertexId) to test for 

Then you get everything you need without exposing the Edge class (which only 
gets used internally for its Writable nature):

if(vertex.hasEdge(targetVertexId)) { 
  E value = vertex.getEdgeValue(targetVertexId);


> Introduce new primitive-specific MutableVertex subclasses
> ---------------------------------------------------------
>                 Key: GIRAPH-28
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-28
>             Project: Giraph
>          Issue Type: New Feature
>          Components: graph
>    Affects Versions: 0.70.0
>            Reporter: Jake Mannix
>            Assignee: Jake Mannix
>         Attachments: GIRAPH-28.diff, GIRAPH-28.diff
> As discussed on the list, 
> MutableVertex<LongWritable,DoubleWritable,FloatWritable,DoubleWritable> (for 
> example) could be highly optimized in its memory footprint if the vertex and 
> edge data were held in a form which minimized Java object usage.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to