incubator-giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From " (Commented) (JIRA)" <>
Subject [jira] [Commented] (GIRAPH-80) Don't expose the list holding the messages in BasicVertex
Date Sat, 17 Dec 2011 09:36:33 GMT

] commented on GIRAPH-80:

This is an automatically generated e-mail. To reply, visit:

(Updated 2011-12-17 09:36:06.229668)

Review request for giraph.

Summary (updated)

refactoring that gives BasicVertex this 3 new methods:

    public abstract Iterable<M> getMessages()

returns an unmodifiable iterable allowing access to the current messages

    public abstract void setMessages(Iterable<M> messages);

replacement for getMsgList().clear() followed by getMsgList().addAll(...);

    public abstract void releaseResources();

after a vertex voted to halt, all references to messages it could still hold should be removed
to enable earlier GC, instead of externally calling replacement for getMsgList().clear(),
this method should be used

Local unit tests pass, unfortunately I wasn't yet able to run the tests on my hadoop cluster
(still have problems because I can only access it via a socks proxy)

This addresses bug GIRAPH-80.


  /trunk/src/main/java/org/apache/giraph/comm/ 1215442 
  /trunk/src/main/java/org/apache/giraph/graph/ 1215442 
  /trunk/src/main/java/org/apache/giraph/graph/ 1215442 
  /trunk/src/main/java/org/apache/giraph/graph/ 1215442 
  /trunk/src/main/java/org/apache/giraph/graph/ 1215442 
  /trunk/src/main/java/org/apache/giraph/graph/ 1215442 
  /trunk/src/main/java/org/apache/giraph/graph/ 1215442 
  /trunk/src/main/java/org/apache/giraph/graph/ 1215442 
  /trunk/src/main/java/org/apache/giraph/utils/ PRE-CREATION 
  /trunk/src/main/java/org/apache/giraph/utils/ 1215442 
  /trunk/src/test/java/org/apache/giraph/utils/ PRE-CREATION 





> Don't expose the list holding the messages in BasicVertex
> ---------------------------------------------------------
>                 Key: GIRAPH-80
>                 URL:
>             Project: Giraph
>          Issue Type: Improvement
>    Affects Versions: 0.70.0
>            Reporter: Sebastian Schelter
> I'm currently trying to implement my own memory efficient vertex (similar to LongDoubleFloatDoubleVertex)
and ran into problems with getMsgList()
> This method returns a list pointing to the messages of the vertex and it is modified
externally (BasicRPCCommunications calls clear() and addAll() e.g.). This makes it very hard
to use something else than a java.util.List internally (LongDoubleFloatDoubleVertex "hacked"
around this) and it is generally dangerous to have the internal state of an object be modified
externally. It also makes the code harder to read and understand.
> I'd suggest to change the API to let a vertex handle the modifications itself internally
(e.g. add something like pushMessages(...))

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