RE: Setting variable value in Compute class and using it in the next superstep

2014-07-23 Thread Sardeshmukh, Vivek
Hello again, As Tom and Matthew suggested I wrote my own custom vertex value class and input format class. I followed Matthew's example to create my own custom vertex class but now I'm getting the following error while running the program java.lang.IllegalStateException: newInstance: Illegal

Setting variable value in Compute class and using it in the next superstep

2014-07-21 Thread Sardeshmukh, Vivek
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

RE: Setting variable value in Compute class and using it in the next superstep

2014-07-21 Thread Schweiger, Tom
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

RE: Setting variable value in Compute class and using it in the next superstep

2014-07-21 Thread Sardeshmukh, Vivek
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

Re: Setting variable value in Compute class and using it in the next superstep

2014-07-21 Thread Matthew Saltz
Tom, If it's necessary to store more than one flag though, for example, won't a custom class be necessary? I'm a beginner too, so I apologize if I'm incorrect about that. Just to be clarify, to keep persistent data for a vertex from one superstep to the next, it is necessary to encapsulate it in

RE: Setting variable value in Compute class and using it in the next superstep

2014-07-21 Thread Schweiger, Tom
For more than one flag, a custom class is necessary (unless you're able to, say, toggle the sign bit to get double usage out or a value). I've started a private thread with Vivek to get a better understanding of what he was trying to solve. And you are also correct that there isn't much to

Re: Setting variable value in Compute class and using it in the next superstep

2014-07-21 Thread Matthew Saltz
Yeah, that's true. Sorry I forgot that part. Luckily, it isn't too tricky either, depending on the input format of your graph. Here's another example https://gist.github.com/saltzm/ab7172c57dec927061be to get you started, for a very simple input format for edges with no values. I basically took