Skip to content

Commit

Permalink
Fix reading after sync at EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-garmash authored and Artem Garmash committed Feb 5, 2016
1 parent 76d3d81 commit d932b16
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python-hadoop/hadoop/io/SequenceFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ def nextRawKey(self):
raise IOError("File is corrupt")
self._sync_seen = True

if self._stream.getPos() >= self._end:
return None

def _readBuffer():
length = readVInt(self._stream)
buf = self._stream.read(length)
Expand Down

0 comments on commit d932b16

Please sign in to comment.