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

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

    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

          People

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

            Dates

              Created:
              Updated:
              Resolved: