Skip to content

Commit 6b854c2

Browse files
committed
HDFS-16958. Fix bug in processing EC excess redundancy.
1 parent 759ddeb commit 6b854c2

File tree

1 file changed

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

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4148,8 +4148,7 @@ private void chooseExcessRedundancyStriped(BlockCollection bc,
41484148
}
41494149
}
41504150

4151-
// cardinality of found indicates the expected number of internal blocks
4152-
final int numOfTarget = found.cardinality();
4151+
final int numOfTarget = sblk.getRealDataBlockNum();
41534152
final BlockStoragePolicy storagePolicy = storagePolicySuite.getPolicy(
41544153
bc.getStoragePolicyID());
41554154
final List<StorageType> excessTypes = storagePolicy.chooseExcess(

0 commit comments

Comments
 (0)