Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-6071

BlockReaderLocal doesn't return -1 on EOF when doing a zero-length read on a short file

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.4.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:

      Description

      BlockReaderLocal doesn't return -1 on EOF when doing a zero-length read on a short file. Specifically, if the file is shorter than the readahead buffer, or if the position is nearer to the end than the length of the readahead buffer, this may happen. This is mainly a concern because libhdfs relies on this to determine whether it should use direct reads.

        Attachments

        1. HDFS-6071.001.patch
          8 kB
          Colin McCabe
        2. HDFS-6071.002.patch
          7 kB
          Colin McCabe

          Issue Links

            Activity

              People

              • Assignee:
                cmccabe Colin McCabe
                Reporter:
                cmccabe Colin McCabe
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: