Gargi-jais11 commented on code in PR #11965:
URL: https://github.com/apache/ozone/pull/11965#discussion_r4610243481


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java:
##########
@@ -449,6 +450,18 @@ public BackgroundTaskQueue getTasks() {
         HddsVolume destVolume = candidate.getDestVolume();
         ContainerData toBalanceContainer = candidate.getContainerData();
         if (toBalanceContainer != null) {
+          if (sourceVolume.getStorageType() != destVolume.getStorageType()) {
+            long startTime = Time.monotonicNow();
+            LOG.warn("Container {}: Source volume storage type ({}) differs 
from destination volume storage type ({}). "
+                    + "Skipping the disk balancing move.",
+                toBalanceContainer.getContainerID(), 
sourceVolume.getStorageType(), destVolume.getStorageType());
+            // The policy reserved destination space, but no task will run 
postCall() to release it.
+            destVolume.incCommittedBytes(0 - 
toBalanceContainer.getBytesUsed());
+            metrics.incrFailureCount(1);

Review Comment:
   I am saying this because **failureCount** and **moveFailureTime** record 
only when a move is started. Here since the task itself is not assigned for 
diskbalancer , so we can drop the two metrics as **failureCount** is defined as 
"the number of failed balance job", and **moveFailureTime** as "the time spent 
on failed container moves".
   
   



-- 
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]

Reply via email to