Thank you Tom for your prompt reply.

If that is the case then I might be doing something wrong. I'll take a closer 
look with debug enabled and keep you posted.


Thank you again.


Vivek

________________________________
From: Schweiger, Tom <thschwei...@ebay.com>
Sent: Monday, July 21, 2014 4:37 PM
To: user@giraph.apache.org
Subject: RE: Setting variable value in Compute class and using it in the next 
superstep

And in answer of :

This post also suggests (along with what I described above) to have a field in 
the vertex value itself. For that I need to change the vertex input format and 
also create my own custom vertex class. Is it really necessary?
No, you don't need a custom vertex class or vertex input format. You can 
create/initialize the value at the beginning of the first superstep.

________________________________
From: Sardeshmukh, Vivek [vivek-sardeshm...@uiowa.edu]
Sent: Monday, July 21, 2014 2:05 PM
To: user@giraph.apache.org
Subject: Setting variable value in Compute class and using it in the next 
superstep


Hi, all--


In my algorithm, I need to set a flag if certain conditions hold (locally at a 
vertex v). If this flag is set then execute some other block of code *only 
once*, and do nothing until some other condition is hold.


My question is, can I declare a flag variable in the class where I override 
compute function? I defined the flag as a public variable and setting it once 
the conditions are met but it seems the value is not "carried" over to the next 
superstep.

I dig a little bit in this mailing list and found this

https://www.mail-archive.com/user@giraph.apache.org/msg01266.html


This post also suggests (along with what I described above) to have a field in 
the vertex value itself. For that I need to change the vertex input format and 
also create my own custom vertex class. Is it really necessary?


By the way, I am using Giraph 1.1.0 compiled against Hadoop 1.0.3. I was able 
to run SimpleShortestPathComputation successfully.


Here are more technical details of my algorithm: I am trying to implement 
Delta-stepping shortest path algorithm ( 
http://dl.acm.org/citation.cfm?id=740136 or 
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.46.2200 ). This was 
mentioned in Pregel paper. A vertex "relax" light edges if it belongs to the 
minimum bucket index (of course, aggregators!). Once a vertex is done with 
relaxing light edges it relaxes heavy edges (here is where I need a flag) once. 
A vertex may be "re-inserted" to a newer bucket and may have to execute all the 
steps that I described here again.


Thanks.


Sincerely,

Vivek
A beginner in Giraph (and Java too!)

Reply via email to