浏览代码

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
xuzifu666 1 年之前
父节点
当前提交
99a59ae9e6

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

@@ -307,6 +307,7 @@ public class DebugAdmin extends Configured implements Tool {
                 smallBufferSize));
         BlockMetadataHeader.writeHeader(metaOut, checksum);
         metaOut.close();
+        metaOut = null;
         FsDatasetUtil.computeChecksum(
             srcMeta, srcMeta, blockFile, smallBufferSize, conf);
         System.out.println(