[ https://issues.apache.org/jira/browse/HIVE-13216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15184064#comment-15184064 ]
Prasanth Jayachandran commented on HIVE-13216: ---------------------------------------------- lgmt, +1. > 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 > 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)