Uploaded image for project: 'ORC'
  1. ORC
  2. ORC-1065

ReaderImpl.extractFileTail IndexOutOfBoundsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.6.12, 1.7.2
    • 1.7.3, 1.6.13
    • Java
    • None

    Description

      ORC-251 remove `ReaderImpl.extractFileTail`

      ORC-685 Add `ReaderImpl.extractFileTail` back

       

      In ORC-685, file length is used as readsize, which causes that if the buffer is read from the cache, the use of length is incorrect, resulting in IndexOutOfBoundsException.

      long readSize = fileLen != -1? fileLen: buffer.limit();
      int psLen = buffer.get((int) (readSize-1)) & 0xff; 
      Caused by: java.lang.IndexOutOfBoundsException
          at java.nio.Buffer.checkIndex(Buffer.java:540)
          at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:139)
          at org.apache.orc.impl.ReaderImpl.extractFileTail(ReaderImpl.java:726)
          at org.apache.hadoop.hive.ql.io.orc.LocalCache.getAndValidate(LocalCache.java:103)
          at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat$ETLSplitStrategy.getSplits(OrcInputFormat.java:798)
          at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat$ETLSplitStrategy.runGetSplitsSync(OrcInputFormat.java:916)
          at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat$ETLSplitStrategy.generateSplitWork(OrcInputFormat.java:885)
          at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.scheduleSplits(OrcInputFormat.java:1759)
          at org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.generateSplitsInfo(OrcInputFormat.java:1703) 

       

      Attachments

        Issue Links

          Activity

            People

              dzcxzl dzcxzl
              dzcxzl dzcxzl
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: