This is an automated email from the ASF dual-hosted git repository.

zhangshuyan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new ac471d7daa32 HDFS-17339:Skip cacheReport when one blockPool does not 
have CacheBlock on this DataNode (#6456). Contributed by lei w.
ac471d7daa32 is described below

commit ac471d7daa320a02cf31bc0864b9428ce8344925
Author: Lei313 <47049042+thinker...@users.noreply.github.com>
AuthorDate: Thu Jan 25 21:15:20 2024 +0800

    HDFS-17339:Skip cacheReport when one blockPool does not have CacheBlock on 
this DataNode (#6456). Contributed by lei w.
    
    Signed-off-by: Shuyan Zhang <zhangshu...@apache.org>
---
 .../java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java   | 4 ++++
 1 file changed, 4 insertions(+)

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 4bac0d8fb47f..13ff9549e020 100755
--- 
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
@@ -503,6 +503,10 @@ class BPServiceActor implements Runnable {
 
       String bpid = bpos.getBlockPoolId();
       List<Long> blockIds = dn.getFSDataset().getCacheReport(bpid);
+      // Skip cache report
+      if (blockIds.isEmpty()) {
+        return null;
+      }
       long createTime = monotonicNow();
 
       cmd = bpNamenode.cacheReport(bpRegistration, bpid, blockIds);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to