orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dongjoon-hyun <...@git.apache.org>
Subject [GitHub] orc pull request #218: ORC-301. `extractFileTail` should open a file in `try...
Date Thu, 15 Feb 2018 19:26:15 GMT
Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/orc/pull/218#discussion_r168582112
  
    --- Diff: java/core/src/java/org/apache/orc/impl/ReaderImpl.java ---
    @@ -516,12 +516,13 @@ OrcTail buildEmptyTail() {
     
       protected OrcTail extractFileTail(FileSystem fs, Path path,
           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 {
    --- End diff --
    
    So, you mean it's okay to remove the following in this PR, right?
    ```
    catch (IOException ex) {
      LOG.error("Failed to close the file after another error", ex);
    }
    ```


---

Mime
View raw message