How do I validate customArguments?

2014-08-26 Thread Matthew Cornell
Hi again. My application needs to pass in a String argument to the
computation which each Vertex needs access to. (The argument is a list of
the form [item1, item2, ...].) I found --customArguments (which I set in
my tests via conf.set(arg_name, arg_val)) but I need to check that it's
properly formatted. Where do I do that? The only thing I thought of is to
specify a DefaultMasterCompute subclass whose initialize() does the check,
but all the initialize() examples do is register aggregators; none of them
check args or do anything else. Thanks in advance! -- matt

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


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

2014-08-26 Thread Matthew Cornell
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 | m...@matthewcornell.org | 413-626-3621 | 34 Dickinson
Street, Amherst MA 01002 | matthewcornell.org