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 @@ public class BlockManager implements BlockStatsMXBean {
|
||||||
BitSet found = new BitSet(groupSize); //indices found
|
BitSet found = new BitSet(groupSize); //indices found
|
||||||
BitSet duplicated = new BitSet(groupSize); //indices found more than once
|
BitSet duplicated = new BitSet(groupSize); //indices found more than once
|
||||||
HashMap<DatanodeStorageInfo, Integer> storage2index = new HashMap<>();
|
HashMap<DatanodeStorageInfo, Integer> storage2index = new HashMap<>();
|
||||||
|
boolean logEmptyExcessType = true;
|
||||||
for (DatanodeStorageInfo storage : nonExcess) {
|
for (DatanodeStorageInfo storage : nonExcess) {
|
||||||
int index = sblk.getStorageBlockIndex(storage);
|
int index = sblk.getStorageBlockIndex(storage);
|
||||||
assert index >= 0;
|
assert index >= 0;
|
||||||
|
@ -4145,6 +4146,7 @@ public class BlockManager implements BlockStatsMXBean {
|
||||||
Integer index = storage2index.get(delStorageHint);
|
Integer index = storage2index.get(delStorageHint);
|
||||||
if (index != null && duplicated.get(index)) {
|
if (index != null && duplicated.get(index)) {
|
||||||
processChosenExcessRedundancy(nonExcess, delStorageHint, storedBlock);
|
processChosenExcessRedundancy(nonExcess, delStorageHint, storedBlock);
|
||||||
|
logEmptyExcessType = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4155,8 +4157,10 @@ public class BlockManager implements BlockStatsMXBean {
|
||||||
final List<StorageType> excessTypes = storagePolicy.chooseExcess(
|
final List<StorageType> excessTypes = storagePolicy.chooseExcess(
|
||||||
(short) numOfTarget, DatanodeStorageInfo.toStorageTypes(nonExcess));
|
(short) numOfTarget, DatanodeStorageInfo.toStorageTypes(nonExcess));
|
||||||
if (excessTypes.isEmpty()) {
|
if (excessTypes.isEmpty()) {
|
||||||
|
if(logEmptyExcessType) {
|
||||||
LOG.warn("excess types chosen for block {} among storages {} is empty",
|
LOG.warn("excess types chosen for block {} among storages {} is empty",
|
||||||
storedBlock, nonExcess);
|
storedBlock, nonExcess);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue