From 1a918a6b960570935338123e5413e64017be6d54 Mon Sep 17 00:00:00 2001 From: hfutatzhanghb Date: Thu, 15 Jun 2023 02:54:22 +0800 Subject: [PATCH] HDFS-17047. BlockManager#addStoredBlock should log storage id when AddBlockResult is REPLACED (#5742). Contributed by farmmamba. Signed-off-by: Ayush Saxena --- .../hadoop/hdfs/server/blockmanagement/BlockManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java index 9133515afb..16b79539fd 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java @@ -3645,7 +3645,8 @@ private Block addStoredBlock(final BlockInfo block, } else if (result == AddBlockResult.REPLACED) { curReplicaDelta = 0; blockLog.warn("BLOCK* addStoredBlock: block {} moved to storageType " + - "{} on node {}", reportedBlock, storageInfo.getStorageType(), node); + "{} on node {} storageId {}, reportedBlock is {}", reportedBlock, + storageInfo.getStorageType(), node, storageInfo.getStorageID(), reportedBlock); } else { // if the same block is added again and the replica was corrupt // previously because of a wrong gen stamp, remove it from the