This is an automated email from the ASF dual-hosted git repository. tasanuma pushed a commit to branch branch-3.3 in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.3 by this push: new 7afcc6df75e3 Delete invalid code logic in namenode format (#6323) 7afcc6df75e3 is described below commit 7afcc6df75e3a3ca17eba450d77442829e4bbe7a Author: zzccctv <zzcc...@163.com> AuthorDate: Fri Dec 29 21:25:05 2023 +0800 Delete invalid code logic in namenode format (#6323) Signed-off-by: Takanobu Asanuma <tasan...@apache.org> (cherry picked from commit 9f76fba6a44bdf281bc8a8874c03301eca73aafb) --- .../main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java index c9beb338a728..a7bea6def91c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java @@ -1253,9 +1253,6 @@ public class NameNode extends ReconfigurableBase implements Collection<URI> nameDirsToFormat = FSNamesystem.getNamespaceDirs(conf); List<URI> sharedDirs = FSNamesystem.getSharedEditsDirs(conf); - List<URI> dirsToPrompt = new ArrayList<URI>(); - dirsToPrompt.addAll(nameDirsToFormat); - dirsToPrompt.addAll(sharedDirs); List<URI> editDirsToFormat = FSNamesystem.getNamespaceEditsDirs(conf); @@ -1298,9 +1295,7 @@ public class NameNode extends ReconfigurableBase implements LOG.warn("Encountered exception during format", ioe); throw ioe; } finally { - if (fsImage != null) { - fsImage.close(); - } + fsImage.close(); if (fsn != null) { fsn.close(); } --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org