hive-issues mailing list archives

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

     [ https://issues.apache.org/jira/browse/HIVE-14869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Prasanth Jayachandran updated HIVE-14869:
-----------------------------------------
    Target Version/s: 2.2.0  (was: 1.2.2)

> Make ORC Reader resilient to 0 length files
> -------------------------------------------
>
>                 Key: HIVE-14869
>                 URL: https://issues.apache.org/jira/browse/HIVE-14869
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>            Reporter: Prasanth Jayachandran
>            Assignee: Prasanth Jayachandran
>
> Orc reader will throw IndexOutOfBounds if used directly. Following is the exception
> {code}
> 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:515)
> 	at org.apache.orc.impl.ReaderImpl.<init>(ReaderImpl.java:368)
> 	at org.apache.orc.OrcFile.createReader(OrcFile.java:222)
> 	at org.apache.orc.TestReader.testReadZeroLengthFile(TestReader.java:57)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> 	at org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:19)
> 	... 22 more
> {code}
> 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
(v6.3.4#6332)

Mime
View raw message