Re: Are mapper classes re-instantiated for each record?

2014-05-16 Thread unmesha sreeveni
Setup() Method is called before all the mappers and cleanup() method is called after all mappers On Tue, May 6, 2014 at 1:17 PM, Raj K Singh rajkrrsi...@gmail.com wrote: point 2 is right,The framework first calls setup() followed by map() for each key/value pair in the InputSplit. Finally

Re: Are mapper classes re-instantiated for each record?

2014-05-07 Thread jeremy p
Thank you! This has helped me immensely. On Tue, May 6, 2014 at 12:47 AM, Raj K Singh rajkrrsi...@gmail.com wrote: point 2 is right,The framework first calls setup() followed by map() for each key/value pair in the InputSplit. Finally cleanup() is called irrespective of no of records in the

Re: Are mapper classes re-instantiated for each record?

2014-05-06 Thread Raj K Singh
point 2 is right,The framework first calls setup() followed by map() for each key/value pair in the InputSplit. Finally cleanup() is called irrespective of no of records in the input split. Raj K Singh http://in.linkedin.com/in/rajkrrsingh

Are mapper classes re-instantiated for each record?

2014-05-05 Thread jeremy p
Let's say I have TaskTracker that receives 5 records to process for a single job. When the TaskTracker processses the first record, it will instantiate my Mapper class and execute my setup() function. It will then run the map() method on that record. My question is this : what happens when the

Re: Are mapper classes re-instantiated for each record?

2014-05-05 Thread Sergey Murylev
Hi Jeremy, According to official documentation http://hadoop.apache.org/docs/r2.2.0/api/org/apache/hadoop/mapreduce/Mapper.html setup and cleanup calls performed for each InputSplit. In this case you variant 2 is more correct. But actually single mapper can be used for processing multiple