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

Azure: IndexOutOfBoundsException in BlockBlobInputStream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.9.0, 3.0.0-beta1
    • fs/azure
    • 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-001.patch
          3 kB
          Thomas Marqardt
        2. HADOOP-14680-branch-2.01.patch
          4 kB
          Jitendra Nath Pandey

        Issue Links

          Activity

            People

              tmarquardt Thomas Marqardt
              rajesh.balamohan Rajesh Balamohan
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: