Description
See
int org.apache.hadoop.fs.FSDataInputStream.PositionCache.read(byte[] b, int off, int len)
if in.read() returns -1 (e.g. at the end of file) the position in the cache will be decremented, while it should be retained.
The attached patch would fix it.