Re: Running one compute function after another..

2014-01-11 Thread Ηλίας Καπουράνης
Hey, You can have a boolean variable initially set to true(or false, whatever). Then you divide your code based on the value of that variable with an if-else statement. For my example, if the value is true then it goes through the first 'if'. When the condition you want is fullfilled, change

Re: Running one compute function after another..

2014-01-11 Thread Jyoti Yadav
Hi Ηλίας Καπουράνης... I will go by this.. Thanks... On Sat, Jan 11, 2014 at 10:52 PM, Ηλίας Καπουράνης ikapo...@csd.auth.grwrote: Hey, You can have a boolean variable initially set to true(or false, whatever). Then you divide your code based on the value of that variable with an if-else

Re: Running one compute function after another..

2014-01-11 Thread Maja Kabiljo
Hi Jyoti, A cleaner way to do this is to switch Computation class which is used in the moment your condition is satisfied. So you can have an aggregator to check whether the condition is met, and then in your MasterCompute you call setComputation(SecondComputationClass.class) when needed.

RE: Running one compute function after another..

2014-01-11 Thread Pavan Kumar A
Jyoti - I recently did a similar thing. In fact, my approach was exactly what Maja suggested. However, there is a caveat. You can switch computation class for workers in mastercompute's compute method but that requires the messages sent by computation class active before switching and messages