You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Yuxing Yao (JIRA)" <ji...@apache.org> on 2016/05/05 05:57:12 UTC

[jira] [Commented] (HIVE-13216) ORC Reader will leave file open until GC when opening a malformed ORC file

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

Yuxing Yao commented on HIVE-13216:
-----------------------------------

Why not put this fix into 2.0.1 release?

> ORC Reader will leave file open until GC when opening a malformed ORC file
> --------------------------------------------------------------------------
>
>                 Key: HIVE-13216
>                 URL: https://issues.apache.org/jira/browse/HIVE-13216
>             Project: Hive
>          Issue Type: Bug
>          Components: File Formats, ORC
>    Affects Versions: 1.2.0, 1.2.1, 2.0.0
>            Reporter: Yuxing Yao
>            Assignee: Sergey Shelukhin
>            Priority: Minor
>             Fix For: 1.3.0, 2.1.0
>
>         Attachments: HIVE-13216.patch
>
>
> In ORC extractMetaInfoFromFooter method of ReaderImpl.java:
> A new input stream is open without try-catch-finally to enforce closing.
> Once the footer parse has some exception, the stream close will miss. 
> Until GC happen to close the stream.
> private static FileMetaInfo extractMetaInfoFromFooter(FileSystem fs,
>                                                         Path path,
>                                                         long maxFileLength
>                                                         ) throws IOException {
>     FSDataInputStream file = fs.open(path);
>     ...
>     file.close();
>     return new FileMetaInfo(
>         ps.getCompression().toString(),
>         (int) ps.getCompressionBlockSize(),
>         (int) ps.getMetadataLength(),
>         buffer,
>         ps.getVersionList(),
>         writerVersion
>         );
>   }



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