Thanks!!


On Sep 5, 2008, at 1:29 PM, "Owen O'Malley" <[EMAIL PROTECTED]> wrote:

On Fri, Sep 5, 2008 at 10:18 AM, Ryan LeCompte <[EMAIL PROTECTED]> wrote:

Thanks! Quick question on that particular class: why are the methods
synchronized? I didn't think that key/value objects needed to be thread
safe?


I picked a simple example out of map/reduce framework to demonstrate the approach. The framework has a lot of threads and so needs synchronization on its own data types. Your maps and reduces are only called by a single thread
and so probably don't need synchronization. (The framework won't call
readFields/write on your types from multiple threads either...)

-- Owen

Reply via email to