You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Derek Shaw <de...@rogers.com> on 2008/05/09 05:16:20 UTC

Parameters for the record reader

Is it possible for the record reader to get a copy of the job configuration or is it otherwise possible to send configuration values to the record reader?

-Derek

Re: Parameters for the record reader

Posted by Arun C Murthy <ar...@yahoo-inc.com>.
On May 8, 2008, at 8:16 PM, Derek Shaw wrote:

> Is it possible for the record reader to get a copy of the job  
> configuration or is it otherwise possible to send configuration  
> values to the record reader?
>

Yes. Typically InputFormat.getRecordReader instantiates the  
RecordReader; and that function is passed the JobConf. So you could  
pass it down from there-on.

Take a look at SequenceFileRecordReader.java or LineRecordReader.java  
in trunk/src/java/org/apache/hadoop/mapred for an example.

Arun