hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xuanflyer (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-12737) orc Instream.java CompressedStream.readHeader() can meet error when read double.
Date Wed, 23 Dec 2015 03:16:46 GMT
xuanflyer created HIVE-12737:
--------------------------------

             Summary: orc Instream.java CompressedStream.readHeader() can meet error when
read double.
                 Key: HIVE-12737
                 URL: https://issues.apache.org/jira/browse/HIVE-12737
             Project: Hive
          Issue Type: Bug
          Components: ORC
    Affects Versions: 1.0.1
            Reporter: xuanflyer
            Priority: Minor




    private void readHeader() throws IOException {
        ....
        ByteBuffer slice = this.slice(chunkLength);
        if (isOriginal) {
          uncompressed = slice;
          isUncompressedOriginal = true;
        } else {
          if (isUncompressedOriginal) {
            uncompressed = allocateBuffer(bufferSize);
            isUncompressedOriginal = false;
          } else if (uncompressed == null) {
            uncompressed = allocateBuffer(bufferSize);
          } else {
            uncompressed.clear();
          }
          codec.decompress(slice, uncompressed);
        }
      } else {
        throw new IllegalStateException("Can't read header at " + this);
      }
}

when reading the 2nd chunk, uncompressed didn't check the data left in itself.
chunkSize is set by hive.exec.orc.default.buffer.size, if user set a number that can't mod
8, when read double, error occurs.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message