To clarify all of the writers.
Store the values you wish to share with your map tasks, in the JobConf
object.

In the configure method of your mapper class, unpack the variables and store
them in class fields of the mapper class.

Then use them as needed in the map method of your mapper class.

On Thu, Jul 9, 2009 at 1:07 PM, Ted Dunning <[email protected]> wrote:

> Use the configuration object.
>
> Remember that the outer class is replicated all across the known universe.
> Your command line arguments only exist on your original machine.
>
> On Thu, Jul 9, 2009 at 11:35 AM, <[email protected]> wrote:
>
> >
> > Hey Ram.
> > The problem is i initialize these variables in the run function after
> >  receiving the cmd line arguments .
> > I want to access the same vars  in the mpa function.
> > Is there a diff way other than passing the variables through a Conf
> object
> >  ?
> >
> >
>



-- 
Pro Hadoop, a book to guide you from beginner to hadoop mastery,
http://www.amazon.com/dp/1430219424?tag=jewlerymall
www.prohadoopbook.com a community for Hadoop Professionals

Reply via email to