HDFS-12903. [READ] Fix closing streams in ImageWriter
This commit is contained in:
parent
71ec170107
commit
962b5e722b
@ -183,9 +183,9 @@ public ImageWriter(Options opts) throws IOException {
|
||||
dirsTmp.deleteOnExit();
|
||||
dirsTmpStream = new FileOutputStream(dirsTmp);
|
||||
dirs = beginSection(dirsTmpStream);
|
||||
} catch (IOException e) {
|
||||
} catch (Throwable e) {
|
||||
IOUtils.cleanupWithLogger(null, raw, dirsTmpStream);
|
||||
throw e;
|
||||
throw new IOException(e);
|
||||
}
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user