HDFS-6291. FSImage may be left unclosed in BootstrapStandby#doRun() ( Contributed by Sanghyun Yun)

(cherry picked from commit e5e492a963)
This commit is contained in:
Vinayakumar B 2015-05-08 11:25:24 +05:30
parent 7fe1d74005
commit 089d420a82
2 changed files with 5 additions and 1 deletions

View File

@ -334,6 +334,9 @@ Release 2.8.0 - UNRELEASED
HDFS-8174. Update replication count to live rep count in fsck report. (J.Andreina)
HDFS-6291. FSImage may be left unclosed in BootstrapStandby#doRun()
(Sanghyun Yun via vinayakumarb)
Release 2.7.1 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -320,8 +320,9 @@ public class BootstrapStandby implements Tool, Configurable {
image.saveDigestAndRenameCheckpointImage(NameNodeFile.IMAGE, imageTxId,
hash);
} catch (IOException ioe) {
image.close();
throw ioe;
} finally {
image.close();
}
return 0;
}