hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Dison <jdiso...@yahoo.com>
Subject Need some help with RecordReader
Date Tue, 28 Oct 2014 21:08:46 GMT
I have a file in the following format:+++++ InvoiceNo=1sometext1+++++ InvoiceNo=2somemoretext2<...>
Each record starts with a line beginning with five "+", then number of invoice.Then several
lines of text.I want the invoice number to become a key for Map operation, and the text to
become a value.
As far as I understand, I need to implement some kind of custom RecordReader class to parse
that format.  But all examples I found on the Internet deal with formats where there is some
mark at the end of the record, but in my case I only can see that records ended after reading
the first line of the next record.
I would be very thankful for any help with implementing such a RecordReader.
Thanks in advance,John.
View raw message