Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop, mail # user - Which FileInputFormat to use for fixed length records?


Copy link to this message
-
Re: Which FileInputFormat to use for fixed length records?
Aaron Kimball 2009-10-21, 05:00
You'll need to write your own, I'm afraid. You should subclass
FileInputFormat and go from there. You may want to look at TextInputFormat /
LineRecordReader for an example of how an IF/RR gets put together, but there
isn't an existing fixed-len record reader.

- Aaron

On Tue, Oct 20, 2009 at 12:59 PM, yz5od2 <[EMAIL PROTECTED]>wrote:

> Hi,
> I have input files, that contain NO carriage returns/line feeds. Each
> record is a fixed length (i.e. 202 bytes).
>
> Which FileInputFormat should I be using? so that each call to my Mapper
> receives one K,V pair, where the KEY is null or something (I don't care) and
> the VALUE is the 202 byte record?
>
> thanks!
>