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

Zero-copy zeroCopyReadRanges and releaseBuffer bugs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • Java, Reader
    • None

    Description

      I found two bugs

      1. org.apache.orc.impl.RecordReaderUtils#zeroCopyReadRanges
        ByteBuffer copy = currentBuffer.duplicate();
        copy.position((int) (current.getOffset() - currentOffset)); 

        if currentBuffer position is not 0, copy.position() will set a uncorrect position.
        I think we should use slice() replace duplicate().

      1. org.apache.orc.impl.ZeroCopyShims.ZeroCopyAdapter#releaseBuffer
        The parameter `buffer` is not the original buffer from hdfs reading. It is the slice or duplicate of the original buffer.
        This bug is reported at ORC-700.

       

       

      Attachments

        Issue Links

          Activity

            People

              xiebin xiebin
              xiebin xiebin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: