[ 
https://issues.apache.org/jira/browse/HIVE-21436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16944379#comment-16944379
 ] 

Piotr Findeisen commented on HIVE-21436:
----------------------------------------

The {{org.apache.hadoop.hive.ql.io.orc.LocalCache#cache}} gets populated from 
{{OrcTail}} objects in 
{{org.apache.hadoop.hive.ql.io.orc.LocalCache#put(org.apache.hadoop.fs.Path, 
org.apache.orc.impl.OrcTail)}}.

I don't see yet why the cache entries are re-validated checking whether they 
are valid ORC footer/tail, but this is the place where the exception is thrown.

> "Malformed ORC file. Invalid postscript length 17" when only one data-file in 
> external table directory
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-21436
>                 URL: https://issues.apache.org/jira/browse/HIVE-21436
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: archon gum
>            Priority: Blocker
>         Attachments: 1.jpg, 2.jpg, hive-insert-into.orc, 
> org-apache-orc-java-code.orc, presto-insert-into.orc
>
>
> h1. env
>  * Presto 305
>  * Hive 3.1.0
>  
> h1. step
>  
> {code:java}
> -- create external table using hiveserver2
> CREATE EXTERNAL TABLE `dw.dim_date2`(
>   `d` date
> )
> STORED AS ORC
> LOCATION
>   'hdfs://datacenter1:8020/user/hive/warehouse/dw.db/dim_date2'
> ;
> -- upload the 'presto-insert-into.orc' file from attachments
> -- OR
> -- insert one row using presto
> insert into dim_date2 values (current_date);
> {code}
>  
>  
> when using `hiveserver2` to query, it works only at the first query and error 
> after then
> !1.jpg!
>  
> If I insert another row, it works
> {code:java}
> -- upload the 'presto-insert-into.orc' file from attachments
> -- OR
> -- insert one row using presto
> insert into dim_date2 values (current_date);
> {code}
> !2.jpg!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to