HDFS-17317. Improve the resource release for metaOut in DebugAdmin (#6402). Contributed by xy.

Reviewed-by: Shilun Fan <slfan1989@apache.org>
Signed-off-by: Ayush Saxena <ayushsaxena@apache.org
This commit is contained in:
xuzifu666 2024-01-07 03:29:31 +08:00 committed by GitHub
parent 64beecb7cb
commit 99a59ae9e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -307,6 +307,7 @@ int run(List<String> args) throws IOException {
smallBufferSize));
BlockMetadataHeader.writeHeader(metaOut, checksum);
metaOut.close();
metaOut = null;
FsDatasetUtil.computeChecksum(
srcMeta, srcMeta, blockFile, smallBufferSize, conf);
System.out.println(