hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gautam Hegde <gau...@aralitechnologies.com>
Subject Re: Query regarding the object creation in map reduce code
Date Fri, 05 Dec 2014 05:48:27 GMT
Hi Raghavendra,

1. Make your objects reusable.
2. Instantiate these Reusable objects in the setup method of the
Mapper/Reducer, so that these objects are instantiated only once.


With Regards,
Gautam Hegde



On Fri, Dec 5, 2014 at 10:46 AM, Raghavendra Chandra <
raghavchandra.learning@gmail.com> wrote:

> Hi All,
>
> I need your help in writing the map reduce program in Java.
>
> I am creating a mapper and reducer classes for reading and processing a
> log file.
>
> I also have many other class files which acts as supporting classes to
> mapper and will be instantiated from mapper class within the map function.
>
>
> *Problem statement : *
>
> Since there are 20 other objects which will be instantiated from mapper
> class within the map function, we think this could create a performance hit
> because of multiple object creation .
>
> Please let us know what could be best approach/design to instantiate these
> 20 classes from Mapper class without compromising on the performance.
>
> Your suggestions/comments are welcome.
>
> Thanks and regards,
> Raghav Chandra
>

Mime
View raw message