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

Read apis in ByteRangeInputStream does not read all the bytes specified when chunked transfer-encoding is used in the server

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.7.1
    • Fix Version/s: None
    • Component/s: webhdfs
    • Labels:
      None

      Description

      With the default Webhdfs server implementation the read apis in ByteRangeInputStream work as expected reading the correct number of bytes for these apis :

      public int read(byte b[], int off, int len)

      public int read(long position, byte[] buffer, int offset, int length)

      But when a custom Webhdfs server implementation is plugged in which uses chunked Transfer-encoding, these apis read only the first chunk. Simple fix would be to loop and read till bytes specified similar to readfully()

        Attachments

        1. HDFS-8943.000.patch
          1 kB
          Shradha Revankar

          Issue Links

            Activity

              People

              • Assignee:
                srevanka Shradha Revankar
                Reporter:
                srevanka Shradha Revankar
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: