From 6df2dc8463c09239a97663d9c3b57d5bf873ee1b Mon Sep 17 00:00:00 2001 From: litao Date: Tue, 9 Mar 2021 00:50:51 +0800 Subject: [PATCH] HDFS-15873. Add namenode address in logs for block report (#2743) (cherry picked from commit 6a922f98967ced0cbcf32d3acf6dfd10712e66a3) (cherry picked from commit 2f56e2b54d0080cd22d3d8461567aa0364f983d8) --- .../hadoop/hdfs/server/datanode/BPServiceActor.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java index b1257705cd9..4a0a54f4de0 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java @@ -423,7 +423,8 @@ class BPServiceActor implements Runnable { final int nCmds = cmds.size(); LOG.info((success ? "S" : "Uns") + "uccessfully sent block report 0x" + - Long.toHexString(reportId) + ", containing " + reports.length + + Long.toHexString(reportId) + " to namenode: " + nnAddr + + ", containing " + reports.length + " storage report(s), of which we sent " + numReportsSent + "." + " The reports had " + totalBlockCount + " total blocks and used " + numRPCs + @@ -934,10 +935,12 @@ class BPServiceActor implements Runnable { void triggerBlockReport(BlockReportOptions options) { if (options.isIncremental()) { - LOG.info(bpos.toString() + ": scheduling an incremental block report."); + LOG.info(bpos.toString() + ": scheduling an incremental block report " + + "to namenode: " + nnAddr + "."); ibrManager.triggerIBR(true); } else { - LOG.info(bpos.toString() + ": scheduling a full block report."); + LOG.info(bpos.toString() + ": scheduling a full block report " + + "to namenode: " + nnAddr + "."); synchronized(ibrManager) { scheduler.forceFullBlockReportNow(); ibrManager.notifyAll();