Review Board 1.7.22


GIRAPH-80 Refactor vertices to not expose the internal datastructure for holding messages

Review Request #3203 - Created Dec. 15, 2011 and updated

Sebastian Schelter
GIRAPH-80
Reviewers
giraph
giraph
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)


 
Review request changed
Updated (Dec. 17, 2011, 9:36 a.m.)
  • changed from Refactor vertices to not expose the internal datastructure for holding messages to GIRAPH-80 Refactor vertices to not expose the internal datastructure for holding messages
Ship it!
Posted (Dec. 18, 2011, 7:33 a.m.)
+1.  Thanks for the changes.  I will commit and then open up a separate JIRA to make setMessages() package-private.