diff --git a/processing/src/main/java/io/druid/segment/data/TmpFileIOPeon.java b/processing/src/main/java/io/druid/segment/data/TmpFileIOPeon.java index a60ed66838c..a575c4116f1 100644 --- a/processing/src/main/java/io/druid/segment/data/TmpFileIOPeon.java +++ b/processing/src/main/java/io/druid/segment/data/TmpFileIOPeon.java @@ -42,6 +42,7 @@ public class TmpFileIOPeon implements IOPeon File retFile = createdFiles.get(filename); if (retFile == null) { retFile = File.createTempFile("filePeon", filename); + retFile.deleteOnExit(); createdFiles.put(filename, retFile); } return new BufferedOutputStream(new FileOutputStream(retFile));