Uploaded image for project: 'ORC'
  1. ORC
  2. ORC-301

`extractFileTail` should open a file in `try` statement

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.1
    • 1.4.4, 1.5.0
    • Java
    • None

    Description

      To prevent opened file leakage, we need to move the file open position.

      --- a/java/core/src/java/org/apache/orc/impl/ReaderImpl.java
             long maxFileLength) throws IOException {
      -    FSDataInputStream file = fs.open(path);
      +    FSDataInputStream file = null;
           ByteBuffer buffer;
           OrcProto.PostScript ps;
           OrcProto.FileTail.Builder fileTailBuilder = OrcProto.FileTail.newBuilder();
           long modificationTime;
           try {
      +      file = fs.open(path);
      

      Attachments

        Activity

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

          People

            dongjoon Dongjoon Hyun
            dongjoon Dongjoon Hyun
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment