Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13017

Implementations of InputStream.read(buffer, offset, bytes) to exit 0 if bytes==0

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8.0
    • 2.8.0
    • fs, io
    • None

    Description

      HDFS-10277 showed that HDFS was return -1 on read(buf[], 0, 0) when there was no data left in the stream; Java IO says

      If len is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read at least one byte.

      Review the implementations of {{IOStream.(buffer, offset, bytes)} and, where necessary and considered safe, add a fast exit if the length is 0.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            stevel@apache.org Steve Loughran Assign to me
            stevel@apache.org Steve Loughran
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment