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 Pete Hunt <fl...@gmail.com> on 2010/04/29 11:36:35 UTC
Custom file formats
Hello all -
I am currently trying to integrate the numpy Python fast-arrays package with
Hadoop. I am basically looking for a way to read binary data similar to a
SequenceFile, except without keys. That is, similar to how the
TextInputFormat emits the position in the file as the key, I would like a
SequenceFileInputFormat that simply emits the position or index in the file
and the value.
Does such a facility exist? If not, how would I go about implementing this?
Thanks,
Pete
Re: Custom file formats
Posted by William Kinney <wi...@gmail.com>.
Not sure if anything else exists, but you can easily implement your own
RecordReader that gets a FSDataInputStream from the FileSystem for the
FileSplit, and then read records from that like you would any other
InputStream (with offset, length, byte[], etc).
On Thu, Apr 29, 2010 at 5:36 AM, Pete Hunt <fl...@gmail.com> wrote:
> Hello all -
>
> I am currently trying to integrate the numpy Python fast-arrays package
> with
> Hadoop. I am basically looking for a way to read binary data similar to a
> SequenceFile, except without keys. That is, similar to how the
> TextInputFormat emits the position in the file as the key, I would like a
> SequenceFileInputFormat that simply emits the position or index in the file
> and the value.
>
> Does such a facility exist? If not, how would I go about implementing this?
>
> Thanks,
>
> Pete
>