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

Create ByteValueVertex to store vertex values as bytes without object instance

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: None
    • Component/s: graph
    • Labels:
      None

      Description

      Facebook task (bootcamped) #4320492

      This modification creates an alternative to DefaultVertex that stores the vertex value as raw bytes and only realizes the object when getValue() is called. The purpose of this change is to reduce memory consumption when vertex values are large.

      User must define their own BytesToValueConverter class to translate the object type to bytes and back. I created ones for float and doubles. Using Java's serialization is bad idea as it adds a lot of overhead (for example full class names). However, one could easily create a generic bytevalueconverter that uses java serialization.

      Configuration -vcl is used to define the vertex class and -bc the converter. For example:
      -vcl org.apache.giraph.graph.ByteValueVertex -bc org.apache.giraph.graph.byteconverters.DoubleConverter

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              akyrola Aapo Kyrola
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: