drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5790) PCAP format explicitly opens local file
Date Thu, 12 Oct 2017 13:23:00 GMT

    [ https://issues.apache.org/jira/browse/DRILL-5790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16201925#comment-16201925
] 

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_r144286736
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/pcap/PcapRecordReader.java
---
    @@ -125,8 +129,8 @@ public int next() {
     
       @Override
       public void close() throws Exception {
    -//    buffer = null;
    -//    in.close();
    +    in.close();
    +    fs.close();
    --- End diff --
    
    Sure, my mistake, I will remove 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)

Mime
View raw message