ivandika3 commented on code in PR #8001:
URL: https://github.com/apache/ozone/pull/8001#discussion_r1982443469
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java:
##########
@@ -446,6 +448,10 @@ public BackgroundTaskResult call() {
}
oldContainer.getContainerData().getVolume()
.decrementUsedSpace(containerSize);
+
+ // Stop timing
+ long endTime = System.currentTimeMillis();
+ metrics.getMoveSuccessTime().add(endTime - startTime);
Review Comment:
Better to put these `endTime` and duration calculations (this and the
subsequent ones) in the `finally` block to prevent duplication.
--
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]