You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ta...@apache.org on 2022/01/27 04:46:06 UTC
[hadoop] branch branch-3.2 updated: HDFS-16427. Add debug log for BlockManager#chooseExcessRedundancyStriped (#3888)
This is an automated email from the ASF dual-hosted git repository.
tasanuma pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new fd6459c HDFS-16427. Add debug log for BlockManager#chooseExcessRedundancyStriped (#3888)
fd6459c is described below
commit fd6459c117008199965b1cdf44aa1792bf4a3599
Author: litao <to...@gmail.com>
AuthorDate: Thu Jan 27 12:42:44 2022 +0800
HDFS-16427. Add debug log for BlockManager#chooseExcessRedundancyStriped (#3888)
(cherry picked from commit 6136d630a351fa1a5dd668c318b20437e6aaa35b)
---
.../apache/hadoop/hdfs/server/blockmanagement/BlockManager.java | 8 ++++++++
1 file changed, 8 insertions(+)
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 8339a2d..25a47cd4 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
@@ -3905,6 +3905,14 @@ public class BlockManager implements BlockStatsMXBean {
List<DatanodeStorageInfo> replicasToDelete = placementPolicy
.chooseReplicasToDelete(nonExcess, candidates, (short) 1,
excessTypes, null, null);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Choose redundant EC replicas to delete from blk_{} which is located in {}",
+ sblk.getBlockId(), storage2index);
+ LOG.debug("Storages with candidate blocks to be deleted: {}", candidates);
+ LOG.debug("Storages with blocks to be deleted: {}", replicasToDelete);
+ }
+ Preconditions.checkArgument(candidates.containsAll(replicasToDelete),
+ "The EC replicas to be deleted are not in the candidate list");
for (DatanodeStorageInfo chosen : replicasToDelete) {
processChosenExcessRedundancy(nonExcess, chosen, storedBlock);
candidates.remove(chosen);
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org