hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Jungblut (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HAMA-738) Save space for Null valued edges
Date Mon, 25 Feb 2013 08:26:13 GMT
Thomas Jungblut created HAMA-738:

             Summary: Save space for Null valued edges
                 Key: HAMA-738
                 URL: https://issues.apache.org/jira/browse/HAMA-738
             Project: Hama
          Issue Type: Bug
          Components: graph
    Affects Versions: 0.6.0, 0.6.1
            Reporter: Thomas Jungblut
            Priority: Minor

Edges should have two different classes:

1. Edge that contains just the ID
2. ValuedEdge that inherits from Edge and adds Value.

This saves space of the references for each edge in case Algorithms have defined NullWritable
as their EdgeValue type.

We keep the "interface" defined by following methods:

- getDestinationVertexID
- getValue/getCost

In the Edge class the getValue/getCost methods are returning constantly null, in the ValuedEdge
the corresponding value.

Proposal for the internal changes:

Factory method createEdge() in GraphJobRunner (analogous to createVertexValue). This factory
takes the class type of the defined EDGE_VALUE into account and handles either the Edge or
the ValuedEdge to the outside. Then refactor all usages of "new Edge<>" in our code
to use that factory method.

Note that after HAMA-704 this just safes a little memory, so this is a minor issue for graphs
with larger number of edges.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message