giraph-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maja Kabiljo <majakabi...@fb.com>
Subject Re: Extending AbstractComputation
Date Wed, 08 Jan 2014 20:31:14 GMT
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 <peter.grman@gmail.com<mailto:peter.grman@gmail.com>>
Reply-To: "user@giraph.apache.org<mailto:user@giraph.apache.org>" <user@giraph.apache.org<mailto:user@giraph.apache.org>>
Date: Monday, December 23, 2013 3:03 PM
To: "user@giraph.apache.org<mailto:user@giraph.apache.org>" <user@giraph.apache.org<mailto:user@giraph.apache.org>>
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 <pushparajxa@gmail.com<mailto:pushparajxa@gmail.com>>
wrote:
Hi,

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

Thanks

Pushparaj


Mime
View raw message