diff --git a/python-hadoop/hadoop/io/SequenceFile.py b/python-hadoop/hadoop/io/SequenceFile.py index 767e9b0..a4b4971 100644 --- a/python-hadoop/hadoop/io/SequenceFile.py +++ b/python-hadoop/hadoop/io/SequenceFile.py @@ -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)