This is an automated email from the ASF dual-hosted git repository. surendralilhore pushed a commit to branch branch-3.1 in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.1 by this push: new a47680a HDFS-14886. In NameNode Web UI's Startup Progress page, Loading edits always shows 0 sec. Contributed by hemanthboyina. a47680a is described below commit a47680a3f94dc1289cd250e7d5643127ed9d619a Author: Surendra Singh Lilhore <surendralilh...@apache.org> AuthorDate: Mon Oct 14 23:31:43 2019 +0530 HDFS-14886. In NameNode Web UI's Startup Progress page, Loading edits always shows 0 sec. Contributed by hemanthboyina. (cherry picked from commit 336abbd8737f3dff38f7bdad9721511c711c522b) --- .../main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java index 71a7053..ddf02de 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java @@ -755,8 +755,10 @@ public class FSImage implements Closeable { prog.endPhase(Phase.LOADING_FSIMAGE); if (!rollingRollback) { + prog.beginPhase(Phase.LOADING_EDITS); long txnsAdvanced = loadEdits(editStreams, target, Long.MAX_VALUE, startOpt, recovery); + prog.endPhase(Phase.LOADING_EDITS); needToSave |= needsResaveBasedOnStaleCheckpoint(imageFile.getFile(), txnsAdvanced); } else { @@ -888,8 +890,6 @@ public class FSImage implements Closeable { StartupOption startOpt, MetaRecoveryContext recovery) throws IOException { LOG.debug("About to load edits:\n " + Joiner.on("\n ").join(editStreams)); - StartupProgress prog = NameNode.getStartupProgress(); - prog.beginPhase(Phase.LOADING_EDITS); long prevLastAppliedTxId = lastAppliedTxId; long remainingReadTxns = maxTxnsToRead; @@ -928,7 +928,6 @@ public class FSImage implements Closeable { } finally { FSEditLog.closeAllStreams(editStreams); } - prog.endPhase(Phase.LOADING_EDITS); return lastAppliedTxId - prevLastAppliedTxId; } --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org