Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 69CA9200D1B for ; Thu, 12 Oct 2017 15:23:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 687901609E8; Thu, 12 Oct 2017 13:23:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A4C781609CD for ; Thu, 12 Oct 2017 15:23:06 +0200 (CEST) Received: (qmail 44191 invoked by uid 500); 12 Oct 2017 13:23:05 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 44182 invoked by uid 99); 12 Oct 2017 13:23:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2017 13:23:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id ED335183250 for ; Thu, 12 Oct 2017 13:23:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id b67IOx4eswWX for ; Thu, 12 Oct 2017 13:23:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3BE4A5FDDC for ; Thu, 12 Oct 2017 13:23:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 75D85E0295 for ; Thu, 12 Oct 2017 13:23:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2A0742140A for ; Thu, 12 Oct 2017 13:23:00 +0000 (UTC) Date: Thu, 12 Oct 2017 13:23:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5790) PCAP format explicitly opens local file MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 12 Oct 2017 13:23:07 -0000 [ https://issues.apache.org/jira/browse/DRILL-5790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16201924#comment-16201924 ] ASF GitHub Bot commented on DRILL-5790: --------------------------------------- Github user Vlad-Storona commented on a diff in the pull request: https://github.com/apache/drill/pull/989#discussion_r144286706 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/pcap/PcapRecordReader.java --- @@ -100,14 +104,14 @@ public void setup(final OperatorContext context, final OutputMutator output) thr this.output = output; this.buffer = new byte[100000]; - this.in = new FileInputStream(inputPath); + this.in = fs.open(pathToFile); this.decoder = new PacketDecoder(in); this.validBytes = in.read(buffer); this.projectedCols = getProjectedColsIfItNull(); setColumns(projectedColumns); } catch (IOException io) { throw UserException.dataReadError(io) - .addContext("File name:", inputPath) + .addContext("File name:", pathToFile.toString()) --- End diff -- Thanks, I will replace it. > PCAP format explicitly opens local file > --------------------------------------- > > Key: DRILL-5790 > URL: https://issues.apache.org/jira/browse/DRILL-5790 > Project: Apache Drill > Issue Type: Bug > Affects Versions: 1.11.0 > Reporter: Ted Dunning > Fix For: 1.12.0 > > > Note the new FileInputStream line > {code} > @Override > public void setup(final OperatorContext context, final OutputMutator output) throws ExecutionSetupException { > try { > this.output = output; > this.buffer = new byte[100000]; > this.in = new FileInputStream(inputPath); > this.decoder = new PacketDecoder(in); > this.validBytes = in.read(buffer); > this.projectedCols = getProjectedColsIfItNull(); > setColumns(projectedColumns); > } catch (IOException io) { > throw UserException.dataReadError(io) > .addContext("File name:", inputPath) > .build(logger); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)