Hi Pushparaj and Peter,

There is going to be one Computation per partition in each of the supersteps. 
Each partition is processed by a single thread, so accessing any data inside of 
your Computation is thread-safe. Multiple threads are going to be executing 
computation on multiple partitions, and therefore not interfere with each 
other. The only part which you have to worry about synchronization is if you 
are using pre/postSuperstep and accessing some global data from WorkerContext.

Regards,
Maja

From: Peter Grman <[email protected]<mailto:[email protected]>>
Reply-To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Date: Monday, December 23, 2013 3:03 PM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Re: Extending AbstractComputation

I don't know the exact logic, maybe somebody who does could elaborate on that, 
but I noticed that it was used multiple times for different Nodes, I would 
think that it is used as a pool to minimize the number of object created, am I 
right here?

The question I would add, can it be that the compute function is called 
concurrently on multiple objects or is it really a pool and the calls to the 
function don't interfere with each other?

Thank
Peter

-----------------------------------------------
Imagination is more important than knowledge. For knowledge is limited, whereas 
imagination embraces the entire world, stimulating progress, giving birth to 
evolution. It is, strictly speaking, a real factor in scientific research.
- Albert Einstein


On Mon, Dec 23, 2013 at 8:56 PM, Pushparaj Motamari 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

The class we write extending AbstractComputation, is instantiated one per 
worker?

Thanks

Pushparaj

Reply via email to