hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasanth Jayachandran (JIRA)" <>
Subject [jira] [Created] (HIVE-14869) Make ORC Reader resilient to 0 length files
Date Fri, 30 Sep 2016 20:27:20 GMT
Prasanth Jayachandran created HIVE-14869:

             Summary: Make ORC Reader resilient to 0 length files
                 Key: HIVE-14869
             Project: Hive
          Issue Type: Bug
          Components: Reader
    Affects Versions: 1.2.1
            Reporter: Prasanth Jayachandran
            Assignee: Prasanth Jayachandran

Orc reader will throw IndexOutOfBounds if used directly. Following is the exception
Caused by: java.lang.IndexOutOfBoundsException
	at java.nio.Buffer.checkIndex(
	at java.nio.HeapByteBuffer.get(
	at org.apache.orc.impl.ReaderImpl.extractFileTail(
	at org.apache.orc.impl.ReaderImpl.<init>(
	at org.apache.orc.OrcFile.createReader(
	at org.apache.orc.TestReader.testReadZeroLengthFile(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(
	at org.junit.internal.runners.statements.ExpectException.evaluate(
	... 22 more


Input format usually avoids such files but not generating splits but if someone uses the Reader
directly on invalid files it should be resilient too. OrcOutputFormat will not create a 0
length so this shouldn't be a problem for files written by Orc itself.

This message was sent by Atlassian JIRA

View raw message