Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13377 AliyunOSS: improvements for stabilization and optimization
  3. HADOOP-14072

AliyunOSS: Failed to read from stream when seek beyond the download size

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha2
    • 3.0.0-alpha4, 2.9.1
    • fs/oss
    • None
    • Reviewed

    Description

      public synchronized void seek(long pos) throws IOException {
          checkNotClosed();
          if (position == pos) {
            return;
          } else if (pos > position && pos < position + partRemaining) {
            AliyunOSSUtils.skipFully(wrappedStream, pos - position);
            position = pos;
          } else {
            reopen(pos);
          }
        }
      

      In seek function, we need to update the partRemaining when the seeking position is located in downloaded part.

      Attachments

        1. HADOOP-14072.001.patch
          3 kB
          Genmao Yu

        Activity

          People

            uncleGen Genmao Yu
            uncleGen Genmao Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: