Skip to content

Commit 26a5f38

Browse files
authored
HDFS-17204. EC: Reduce unnecessary log when processing excess redundancy. (#6107). Contributed by Shuyan Zhang.
Reviewed-by: Haiyang Hu <haiyang.hu@shopee.com> Signed-off-by: He Xiaoqiao <hexiaoqiao@apache.org>
1 parent 3de66f5 commit 26a5f38

File tree

1 file changed

+6
-0
lines changed
  • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement

1 file changed

+6
-0
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4201,6 +4201,12 @@ private void chooseExcessRedundancyStriped(BlockCollection bc,
42014201
storage2index.put(storage, index);
42024202
}
42034203

4204+
if (duplicated.isEmpty()) {
4205+
LOG.debug("Found no duplicated internal blocks for {}. Maybe it's " +
4206+
"because there are stale storages.", storedBlock);
4207+
return;
4208+
}
4209+
42044210
// use delHint only if delHint is duplicated
42054211
final DatanodeStorageInfo delStorageHint =
42064212
DatanodeStorageInfo.getDatanodeStorageInfo(nonExcess, delNodeHint);

0 commit comments

Comments
 (0)