From 3cdcf8736f2f2559c466aae9793c281545ef5b16 Mon Sep 17 00:00:00 2001 From: Charles Allen Date: Thu, 13 Nov 2014 08:56:11 -0800 Subject: [PATCH] Changed downloadStartMarker in OmniSegmentLoader to simply use its .delete() method --- .../java/io/druid/segment/loading/OmniSegmentLoader.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/io/druid/segment/loading/OmniSegmentLoader.java b/server/src/main/java/io/druid/segment/loading/OmniSegmentLoader.java index d67695d5376..b1c3162c100 100644 --- a/server/src/main/java/io/druid/segment/loading/OmniSegmentLoader.java +++ b/server/src/main/java/io/druid/segment/loading/OmniSegmentLoader.java @@ -138,13 +138,11 @@ public class OmniSegmentLoader implements SegmentLoader getPuller(segment.getLoadSpec()).getSegmentFiles(segment, storageDir); - try { - FileUtils.deleteDirectory(downloadStartMarker); - } - catch (Exception e) { + if (!downloadStartMarker.delete()) { throw new SegmentLoadingException("Unable to remove marker file for [%s]", storageDir); } + loc.addSegment(segment); retVal = storageDir;