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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.2.1, 2.0.0
    • Fix Version/s: 1.3.0, 2.1.0
    • Component/s: File Formats, ORC
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: