Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-13216

ORC Reader will leave file open until GC when opening a malformed ORC file

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2.0, 1.2.1, 2.0.0
    • 1.3.0, 2.1.0
    • File Formats, ORC
    • None

    Description

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

      Attachments

        1. HIVE-13216.patch
          5 kB
          Sergey Shelukhin

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            sershe Sergey Shelukhin Assign to me
            melode11 Yuxing Yao
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment