hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Owen O'Malley" <...@yahoo-inc.com>
Subject Re: Getting input key/value classes in mapper configuration method?
Date Wed, 13 Jun 2007 18:02:01 GMT

On Jun 13, 2007, at 10:47 AM, Johan Oskarsson wrote:

> I've been trying to figure out a nice and clean way of getting
> the key class of the input values in my mapper's configuration method.

> What's the recommended way of doing this?
> The only way I can think of is to specify this in a separate  
> property in JobConf but that feels redundant. Or to do the setup in  
> the actual map method, not very nice.

Those are the only two ways that I can think of too. In most cases it  
works the other way and the Map has requirements on the input key/ 
value classes. In the longer run, the best answer will be after we  
move to context objects: https://issues.apache.org/jira/browse/ 
HADOOP-1230 , will be to have a getInputKeyClass and  
getInputValueClass methods in the context object.

-- Owen

View raw message