Hadoop icon indicating copy to clipboard operation
Hadoop copied to clipboard

SequenceFile reader fails when file ends with sync

Open kmatzen opened this issue 11 years ago • 0 comments

The check for EOF appears here. https://github.com/matteobertozzi/Hadoop/blob/master/python-hadoop/hadoop/io/SequenceFile.py#L346

If that check reports that we are not at EOF, then it attempts to read any sync.

Then it proceeds to read records without checking whether or not reading that sync placed it at the EOF. https://github.com/matteobertozzi/Hadoop/blob/master/python-hadoop/hadoop/io/SequenceFile.py#L361

Example of why you might have a sync right before EOF: https://github.com/matteobertozzi/Hadoop/blob/master/python-hadoop/hadoop/io/SequenceFile.py#L154

kmatzen avatar Dec 22 '13 03:12 kmatzen