symious commented on code in PR #4887:
URL: https://github.com/apache/ozone/pull/4887#discussion_r1469610526


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java:
##########
@@ -367,7 +393,88 @@ private class DiskBalancerTask implements BackgroundTask {
 
     @Override
     public BackgroundTaskResult call() {
-      // TODO: Details of handling tasks
+      long containerId = containerData.getContainerID();
+      boolean destVolumeIncreased = false;
+      Path diskBalancerTmpDir = null, diskBalancerDestDir = null;
+      long containerSize = containerData.getBytesUsed();
+      try {
+        diskBalancerTmpDir = destVolume.getTmpPath()
+            .resolve(DISK_BALANCER_DIR).resolve(String.valueOf(containerId));
+
+        // Copy container to new Volume's tmp Dir
+        ozoneContainer.getController().copyContainer(containerData,

Review Comment:
   I think currently we don't have such locks. Since the locks could be 
time-consuming for export and import, other operations might be complaining 
about it.
   
   And I think it's possible now that there are already some replicas not same 
with others, due to DN restart or exporting, it should be good to have a 
mechanism to sync among all replicas.



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