Bug description
HadoopSeekableInputStream.skipFully (and its copies in every HadoopCompliantFileIO wrapper: azure, cosn, gs, jindo, obs, oss, s3) loops with
while (bytes > 0) { bytes -= in.skip(bytes); }
A blocking stream at end of file returns 0 from skip, so a small forward seek — the vectored-read seek helper skips gaps of up to 1 MiB instead of seeking — past a truncated or shorter-than-expected file spins the loop forever instead of failing the read.
Expected behavior
Throw EOFException when a skip call makes no progress, like Hadoop's own IOUtils.skipFully treats premature EOF.
Bug description
HadoopSeekableInputStream.skipFully(and its copies in every HadoopCompliantFileIO wrapper: azure, cosn, gs, jindo, obs, oss, s3) loops withA blocking stream at end of file returns 0 from
skip, so a small forward seek — the vectored-read seek helper skips gaps of up to 1 MiB instead of seeking — past a truncated or shorter-than-expected file spins the loop forever instead of failing the read.Expected behavior
Throw
EOFExceptionwhen a skip call makes no progress, like Hadoop's ownIOUtils.skipFullytreats premature EOF.