hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Farhan Husain <farhan.hus...@csebuet.org>
Subject Re: Configuration.set/Configuration.get now working
Date Mon, 04 Jan 2010 01:22:32 GMT
Hello all,

I am still stuck with the following problem. Can anyone please help me?

Thanks,
Farhan

On Wed, Dec 30, 2009 at 11:21 AM, Farhan Husain
<farhan.husain@csebuet.org>wrote:

> Hello,
>
> I am using hadoop-0.20.1. I need to know the input file name in my map
> processes and pass an integer and a string to my reduce processes. I used
> the following method calls for that:
>
> config.set("tag1", "string_value");
> config.setInt("tag2", int_value);
>
> In setup method of mapper:
> String filename =
> context.getConfiguration().get("map.input.file")            // returns null
>
> In setup method of reducer:
> String val =
> context.getConfiguration().get("tag1");                                //
> returns null
> int n = context.getConfiguration().getInt("tag2",
> def_val);                        // returns def_val
>
> Can anyone please tell me what may be wrong with this code or anything
> related to it?
>
> Thanks,
> Farhan
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message