From c2c6972f251594d3ec1e92894afcb1dac6364efb Mon Sep 17 00:00:00 2001 From: Liangjun He <2005hithlj@163.com> Date: Wed, 6 Sep 2023 20:19:04 +0800 Subject: [PATCH] HDFS-17140. Revisit the BPOfferService.reportBadBlocks() method. (#5924). Contributed by Liangjun He. Reviewed-by: Shilun Fan Signed-off-by: He Xiaoqiao --- .../org/apache/hadoop/hdfs/server/datanode/BPOfferService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java index fdd66cb05d..b228fb2d57 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java @@ -291,9 +291,8 @@ public String toString() { void reportBadBlocks(ExtendedBlock block, String storageUuid, StorageType storageType) { checkBlock(block); + ReportBadBlockAction rbbAction = new ReportBadBlockAction(block, storageUuid, storageType); for (BPServiceActor actor : bpServices) { - ReportBadBlockAction rbbAction = new ReportBadBlockAction - (block, storageUuid, storageType); actor.bpThreadEnqueue(rbbAction); } }