[ https://issues.apache.org/jira/browse/HIVE-12737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gopal V updated HIVE-12737: --------------------------- Description: {code} 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); } } {code} 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. was: 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. > 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 > > {code} > 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); > } > } > {code} > 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)