From dev-return-1835-archive-asf-public=cust-asf.ponee.io@orc.apache.org Thu Feb 15 20:26:19 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 7797A18064A for ; Thu, 15 Feb 2018 20:26:18 +0100 (CET) Received: (qmail 86469 invoked by uid 500); 15 Feb 2018 19:26:17 -0000 Mailing-List: contact dev-help@orc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@orc.apache.org Delivered-To: mailing list dev@orc.apache.org Received: (qmail 86458 invoked by uid 99); 15 Feb 2018 19:26:16 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Feb 2018 19:26:16 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D82E5E01EC; Thu, 15 Feb 2018 19:26:15 +0000 (UTC) From: dongjoon-hyun To: dev@orc.apache.org Reply-To: dev@orc.apache.org References: In-Reply-To: Subject: [GitHub] orc pull request #218: ORC-301. `extractFileTail` should open a file in `try... Content-Type: text/plain Message-Id: <20180215192615.D82E5E01EC@git1-us-west.apache.org> Date: Thu, 15 Feb 2018 19:26:15 +0000 (UTC) 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); } ``` ---