From c1d19c39517df1944c01b90ae738239b465f6664 Mon Sep 17 00:00:00 2001 From: huhaiyang Date: Fri, 14 Jul 2023 14:26:54 +0800 Subject: [PATCH] HDFS-17081. EC: Add logic for striped blocks in isSufficientlyReplicated (#5833). Contributed by Haiyang Hu. Signed-off-by: Ayush Saxena --- .../apache/hadoop/hdfs/server/blockmanagement/BlockManager.java | 2 +- 1 file changed, 1 insertion(+), 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 fab3619cb2..e09fe7fbd9 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 @@ -1696,7 +1696,7 @@ public void verifyReplication(String src, public boolean isSufficientlyReplicated(BlockInfo b) { // Compare against the lesser of the minReplication and number of live DNs. final int liveReplicas = countNodes(b).liveReplicas(); - if (liveReplicas >= minReplication) { + if (hasMinStorage(b, liveReplicas)) { return true; } // getNumLiveDataNodes() is very expensive and we minimize its use by