hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Test <erik.shi...@gmail.com>
Subject Re: Set variables in mapper
Date Tue, 03 Aug 2010 13:12:42 GMT
Really? This seems pretty nice.

In the future, with your implementation, would the value always have to be
wrapped in a MyMapper instance? How would parameters be removed if
necessary?

Erik


On 3 August 2010 02:37, Owen O'Malley <omalley@apache.org> wrote:

>
> On Aug 2, 2010, at 9:17 AM, Erik Test wrote:
>
>  I'm trying to set a variable in my mapper class by reading an argument
>> from
>> the command line and then passing the entry to the mapper from main. Is
>> this
>> possible?
>>
>
> Others have already answered with the current solution of using JobConf to
> store the value. I should also note that I plan to implement MAPREDUCE-1183
> for 0.22. It will allow you to do this directly like:
>
> job.setMapper(new MyMapper(someIntegerParameter));
>
> which will serialize MyMapper's state, including the integer parameter, and
> store it as part of your job.
>
> -- Owen
>

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