HDFS-12903. [READ] Fix closing streams in ImageWriter
This commit is contained in:
parent
eaf5f99bc4
commit
c1bf2654b0
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue