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

Azure: IndexOutOfBoundsException in BlockBlobInputStream

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-beta1
    • Component/s: fs/azure
    • Labels:
      None

      Description

      https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/BlockBlobInputStream.java#L361

      On certain conditions, BlockBlobInputStream can throw IndexOutOfBoundsException. Following is an example

      length:297898, offset:4194304, buf.len:4492202, writePos:4194304 :
      In this case, MemoryOutputStream::capacity() would end up returning negative value and can cause IndexOutOfBoundsException

      It should be return buffer.length - offset; to determine current capacity.

        Attachments

        1. HADOOP-14680-branch-2.01.patch
          4 kB
          Jitendra Nath Pandey
        2. HADOOP-14680-001.patch
          3 kB
          Thomas Marquardt

          Issue Links

            Activity

              People

              • Assignee:
                tmarquardt Thomas Marquardt
                Reporter:
                rajesh.balamohan Rajesh Balamohan
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: