HDFS-16948. Update log of BlockManager#chooseExcessRedundancyStriped when EC internal block is moved by balancer. (#5474). Contributed by Kidd53685368.
Reviewed-by: zhangshuyan <zqingchai@gmail.com> Signed-off-by: He Xiaoqiao <hexiaoqiao@apache.org>
This commit is contained in:
parent
028cde0006
commit
5cf62d1498
@ -4128,6 +4128,7 @@ private void chooseExcessRedundancyStriped(BlockCollection bc,
|
||||
BitSet found = new BitSet(groupSize); //indices found
|
||||
BitSet duplicated = new BitSet(groupSize); //indices found more than once
|
||||
HashMap<DatanodeStorageInfo, Integer> storage2index = new HashMap<>();
|
||||
boolean logEmptyExcessType = true;
|
||||
for (DatanodeStorageInfo storage : nonExcess) {
|
||||
int index = sblk.getStorageBlockIndex(storage);
|
||||
assert index >= 0;
|
||||
@ -4145,6 +4146,7 @@ private void chooseExcessRedundancyStriped(BlockCollection bc,
|
||||
Integer index = storage2index.get(delStorageHint);
|
||||
if (index != null && duplicated.get(index)) {
|
||||
processChosenExcessRedundancy(nonExcess, delStorageHint, storedBlock);
|
||||
logEmptyExcessType = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4155,8 +4157,10 @@ private void chooseExcessRedundancyStriped(BlockCollection bc,
|
||||
final List<StorageType> excessTypes = storagePolicy.chooseExcess(
|
||||
(short) numOfTarget, DatanodeStorageInfo.toStorageTypes(nonExcess));
|
||||
if (excessTypes.isEmpty()) {
|
||||
LOG.warn("excess types chosen for block {} among storages {} is empty",
|
||||
storedBlock, nonExcess);
|
||||
if(logEmptyExcessType) {
|
||||
LOG.warn("excess types chosen for block {} among storages {} is empty",
|
||||
storedBlock, nonExcess);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user