-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.3.0
-
Fix Version/s: 2.3.0
-
Component/s: None
-
Labels:None
-
Target Version/s:
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.
- relates to
-
HDFS-6071 BlockReaderLocal doesn't return -1 on EOF when doing a zero-length read on a short file
-
- Closed
-