Uploaded image for project: 'Giraph'
  1. Giraph
  2. GIRAPH-80

Don't expose the list holding the messages in BasicVertex

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.1.0
    • Fix Version/s: 0.1.0
    • Component/s: None
    • Labels:
      None

      Description

      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(...))

        Attachments

          Activity

            People

            • Assignee:
              ssc Sebastian Schelter
              Reporter:
              ssc Sebastian Schelter
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: