[ https://issues.apache.org/jira/browse/DRILL-2100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15220447#comment-15220447 ]
ASF GitHub Bot commented on DRILL-2100: --------------------------------------- Github user StevenMPhillips commented on a diff in the pull request: https://github.com/apache/drill/pull/454#discussion_r58107846 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java --- @@ -110,11 +111,12 @@ private LinkedList<BatchGroup> batchGroups = Lists.newLinkedList(); private LinkedList<BatchGroup> spilledBatchGroups = Lists.newLinkedList(); private SelectionVector4 sv4; - private FileSystem fs; + private static FileSystem fs; --- End diff -- I agree with Jacques, except I would probably have one directory per sort operator in a fragment, rather one per fragment. This way the ExternalSort operator would be responsible for cleaning it up, and we wouldn't have to manage it at the Fragment level. To clarify, right now the spill files for a sort go in a directory with the path: <root spill dir>/<query_id>/<major_frag_id>/<minor_frag_id>/<operator_id>/ Instead we should make it: <root spill dir>/<query_id>_<major_frag_id>_<minor_frag_id>_<operator_id>/ That way, the sort operator itself will be able to cleanup its own spill directory, and there won't be any empty directories left over. > Drill not deleting spooling files > --------------------------------- > > Key: DRILL-2100 > URL: https://issues.apache.org/jira/browse/DRILL-2100 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Relational Operators > Affects Versions: 0.8.0 > Reporter: Abhishek Girish > Assignee: Vitalii Diravka > Fix For: Future > > > Currently, after forcing queries to use an external sort by switching off > hash join/agg causes spill-to-disk files accumulating. > This causes issues with disk space availability when the spill is configured > to be on the local file system (/tmp/drill). Also not optimal when configured > to use DFS (custom). > Drill must clean up all temporary files created after a query completes or > after a drillbit restart. -- This message was sent by Atlassian JIRA (v6.3.4#6332)