hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <qwertyman...@gmail.com>
Subject Re: Is there any smart ways to give arguments to mappers & reducers from a main job?
Date Thu, 10 Feb 2011 10:42:40 GMT
Your 'Job' must reference this Configuration object for it to take
those values. If it does not know about it, it would not work,
logically :-)

For example, create your Configuration and set things into it, and
only then do new Job(ConfigurationObj) to make it use your configured
object for this job.

On Thu, Feb 10, 2011 at 3:19 PM, Jun Young Kim <juneng603@gmail.com> wrote:
> Hi, all
>
> in my job, I wanna pass some arguments to mappers and reducers from a main
> job.
>
> I googled some references to do that by using Configuration.
>
> but, it's not working.
>
> code)
>
> job)
> Configuration conf = new Configuration();
> conf.set("test", "value");
>
> mapper)
>
> doMap() extends Mapper... {
> System.out.println(context.getConfiguration.get("test"));
> /// --> this printed out "null"
> }
>
> How could I do that to make it working?--
>
> Junyoung Kim (juneng603@gmail.com)
>
>



-- 
Harsh J
www.harshj.com

Mime
View raw message