drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arina-ielchiieva <...@git.apache.org>
Subject [GitHub] drill pull request #989: DRILL-5790: PCAP format explicitly opens local file
Date Thu, 12 Oct 2017 12:34:42 GMT
Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/989#discussion_r144269528
  
    --- 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 --
    
    It's better you use `pathToFile.toUri().getPath()`.


---

Mime
View raw message