Skip to content

Commit 99a59ae

Browse files
authored
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
1 parent 64beecb commit 99a59ae

File tree

1 file changed

+1
-0
lines changed
  • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools

1 file changed

+1
-0
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DebugAdmin.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ int run(List<String> args) throws IOException {
307307
smallBufferSize));
308308
BlockMetadataHeader.writeHeader(metaOut, checksum);
309309
metaOut.close();
310+
metaOut = null;
310311
FsDatasetUtil.computeChecksum(
311312
srcMeta, srcMeta, blockFile, smallBufferSize, conf);
312313
System.out.println(

0 commit comments

Comments
 (0)