hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shelukhin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-13216) ORC Reader will leave file open until GC when opening a malformed ORC file
Date Wed, 09 Mar 2016 19:17:40 GMT

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

Sergey Shelukhin updated HIVE-13216:
------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.1.0
                   1.3.0
           Status: Resolved  (was: Patch Available)

Committed to master and branch-1. Thanks for the review!

> 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)

Mime
View raw message