HDFS-12903. [READ] Fix closing streams in ImageWriter

This commit is contained in:
Virajith Jalaparti 2017-12-07 14:21:24 -08:00
parent eaf5f99bc4
commit c1bf2654b0
1 changed files with 2 additions and 2 deletions

View File

@ -183,9 +183,9 @@ public class ImageWriter implements Closeable {
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 {