You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by Matthew Cornell <ma...@matthewcornell.org> on 2014/08/26 21:28:49 UTC

Which is better to use to manage Vertex state: POJO instance variables or Giraph values?

Hi there. I'm confused about when it's OK to use Vertex instance variables
to maintain state rather than proper Giraph values ala getValue(). An
interesting example I found in the source demonstrates both:
SimpleTriangleClosingVertex, which has both an instance variable (closeMap)
and a custom vertex value (IntArrayListWritable). I'm a little surprised
that using an instance variable is legit due to possibly screwing up
serialization (?) My question: Is either valid? If so, how do I choose one
over the other? Thanks very much. -- matt

-- 
Matthew Cornell | matt@matthewcornell.org | 413-626-3621 | 34 Dickinson
Street, Amherst MA 01002 | matthewcornell.org