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

FSDataInputStream/FSInputStream to implement getFileLength()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.0
    • None
    • fs, fs/s3
    • None

    Description

      server-side transcoding, predicate-pushdown filtering in storage, client-side decryption can all result in an input stream shorter or longer than the file size as measured in getFileStatus/listFiles/listStatus.

      Assuming the length is known once open() returns, the FSDataInputStream can return the length of the data, which can then be used for accurate seeks within the data.

      • requires the streams to know their length; easy to check (hasCapabilities), or make the new method return an Optional<Long>, but caller will need to (a) look for this if present and (b) fall back.
      • Could be rolled out for all our own clients/connectors, would take time for others

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stevel@apache.org Steve Loughran
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: