mirror of https://github.com/apache/druid.git
Fix S3DataSegmentPuller retry bug
This commit is contained in:
parent
9b57b4e1f3
commit
45e22d98f1
|
@ -110,7 +110,6 @@ public class S3DataSegmentPuller implements DataSegmentPuller
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
catch (IOException e) {
|
catch (IOException e) {
|
||||||
FileUtils.deleteDirectory(outDir);
|
|
||||||
throw new IOException(String.format("Problem decompressing object[%s]", s3Obj), e);
|
throw new IOException(String.format("Problem decompressing object[%s]", s3Obj), e);
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
@ -125,6 +124,16 @@ public class S3DataSegmentPuller implements DataSegmentPuller
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
|
try {
|
||||||
|
FileUtils.deleteDirectory(outDir);
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
log.warn(
|
||||||
|
ioe,
|
||||||
|
"Failed to remove output directory for segment[%s] after exception: %s",
|
||||||
|
segment.getIdentifier(),
|
||||||
|
outDir
|
||||||
|
);
|
||||||
|
}
|
||||||
throw new SegmentLoadingException(e, e.getMessage());
|
throw new SegmentLoadingException(e, e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue