aswinshakil commented on code in PR #3655:
URL: https://github.com/apache/ozone/pull/3655#discussion_r951790063
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/statemachine/background/BlockDeletingService.java:
##########
@@ -180,6 +180,8 @@ public List<ContainerBlockInfo>
chooseContainerForBlockDeletion(
throws StorageContainerException {
Map<Long, ContainerData> containerDataMap =
ozoneContainer.getContainerSet().getContainerMap().entrySet().stream()
+ .filter(e -> ((KeyValueContainerData) e.getValue()
+ .getContainerData()).getNumPendingDeletionBlocks() > 0)
Review Comment:
Since we are already filtering ContainerData based on the pending block
deletes. We should refactor the code to not check again for
`entry.getNumPendingDeletionBlocks() > 0`
https://github.com/apache/ozone/blob/8d331a371fca43f5f7a4cf027f227f237388dc46/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/TopNOrderedContainerDeletionChoosingPolicy.java#L76-L83
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]