Uploaded image for project: 'CDH (READ-ONLY)'
  1. CDH (READ-ONLY)
  2. DISTRO-405

WebHDFS filesystem client cannot open files >= 24KB

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: CDH4.0.0
    • Fix Version/s: CDH4.1.0
    • Component/s: HDFS
    • Labels:
      None

      Description

      If you use the webhdfs filesystem client to open a file >= 24KB it will throw an IOException saying "content-length header missing". I added a simple unit test to show this into the hdfs project and ran the test with the expected results (see webhdfsBug.txt attached for unit-test and results).

      This seems to stem from the fact that the server side begins using chunked encoding when the files are >= 24KB. The client side expects a content length and to have to make several http calls in order to download the file (see org.apache.hadoop.hdfs.ByteRangeInputStream). Even though the client may specify a 'length' and 'offset' parameter the server will serve the file using chunked encoding if the file is >= 24KB.

      Files < 24KB work fine with the client.

        Attachments

          Activity

            People

            • Assignee:
              eli Eli Collins
              Reporter:
              bjbq4d Bryan Baugher
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: