You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Yuxing Yao (JIRA)" <ji...@apache.org> on 2016/03/07 06:51:40 UTC

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

Yuxing Yao created HIVE-13216:
---------------------------------

             Summary: 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.1, 1.2.0
            Reporter: Yuxing Yao
            Priority: Minor


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)