Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce, mail # user - Passing a Global Variable into a Mapper


Copy link to this message
-
Re: Passing a Global Variable into a Mapper
Swathi V 2011-09-15, 17:53
Hi,
I guess you can make use of job.getconfiguration().set() in driver to set
the variable and in mapper you can make use of setup method like this:
Configuration conf = context.getconfiguration();
somevar = conf.get();

On Thu, Sep 15, 2011 at 11:13 PM, Arko Provo Mukherjee <
[EMAIL PROTECTED]> wrote:

> Hi,
>
> Is there a way to pass some data from the driver class to the Mapper
> class without going through the HDFS?
>
> Does the API provide us with some functionality to pass some variables?
>
> Thanks a lot in advance!
> Warm regards
> Arko
>

--
Regards,
Swathi.V.