xichen01 commented on code in PR #4800:
URL: https://github.com/apache/ozone/pull/4800#discussion_r1211221429
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/statemachine/background/BlockDeletingService.java:
##########
@@ -175,13 +175,19 @@ public BackgroundTaskQueue getTasks() {
public List<ContainerBlockInfo> chooseContainerForBlockDeletion(
int blockLimit, ContainerDeletionChoosingPolicy deletionPolicy)
throws StorageContainerException {
+ long[] totalPendingBlockCount = new long[1];
Review Comment:
`totalPendingBlockCount` is an array of size 1 because variables used in
lambda expressions must be effectively final. Using an array allows you to
modify its content inside the lambda while keeping the array reference
unchanged.
--
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]