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 Jeremy Chow <co...@gmail.com> on 2008/09/24 16:21:17 UTC
How can I get the record number of a SequenceFile?
Hi list,
I've generated a sequence file by a reducer, then I will use it to start the
second map step, which need the record number of that sequence file. How can
it fast ?
thanks a lot.
--
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.
http://coderplay.javaeye.com
Re: How can I get the record number of a SequenceFile?
Posted by Deyaa Adranale <de...@iais.fraunhofer.de>.
Hi Jeremy,
I think the key of the map function is the number of the record in a
sequence file.
I was trying to retrieve the record number in a normal TextInputFormat
but could not find it. The best what I could use is the byte offset of
the record, which does not reflex the record number since the records
might have different lengths. I have even tried to write my own input
format (for plain text files) but even did not work :-(. anybody could
give me a hint on this?
regards
Deyaa
Jeremy Chow wrote:
> Hi list,
>
> I've generated a sequence file by a reducer, then I will use it to start the
> second map step, which need the record number of that sequence file. How can
> it fast ?
> thanks a lot.
>
>