Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.0
-
None
-
None
Description
Unlike the other block readers, BlockReaderLocal currently doesn't return -1 on EOF when doing zero-length reads. This behavior, in turn, propagates to the DFSInputStream. BlockReaderLocal should do this, so that client can determine whether the file is at an end by doing a zero-length read and checking for -1.
One place this shows up is in libhdfs, which does such a 0-length read to determine if direct (i.e., ByteBuffer) reads are supported.
Attachments
Attachments
Issue Links
- relates to
-
HDFS-6071 BlockReaderLocal doesn't return -1 on EOF when doing a zero-length read on a short file
-
- Closed
-