drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vdiravka <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-2100: Added deleting temporary spill dir...
Date Thu, 21 Apr 2016 14:03:38 GMT
Github user vdiravka commented on a diff in the pull request:

    https://github.com/apache/drill/pull/454#discussion_r60585364
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
---
    @@ -554,7 +572,18 @@ public BatchGroup mergeAndSpill(LinkedList<BatchGroup> batchGroups)
throws Schem
         c1.buildSchema(BatchSchema.SelectionVectorMode.NONE);
         c1.setRecordCount(count);
     
    -    String outputFile = Joiner.on("/").join(dirs.next(), fileName, spillCount++);
    +    String spillDir = dirs.next();
    +    Path currSpillPath = new Path(Joiner.on("/").join(spillDir, fileName));
    +    currSpillDirs.add(currSpillPath);
    +    String outputFile = Joiner.on("/").join(currSpillPath, spillCount++);
    +    try {
    +        fs.deleteOnExit(currSpillPath);
    +    } catch (IOException e) {
    +        // since this is meant to be used in a batches's spilling, we don't propagate
the exception
    +        final String message = "Unable to mark spill directory \"" + currSpillPath +
"\" to delete on exit";
    +        System.err.println(message + '.');
    --- End diff --
    
    Updated


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message