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;