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