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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java:
##########
@@ -458,8 +507,8 @@ public BackgroundTaskResult call() {
       container.readLock();
       try {
         // Step 1: Copy container to new Volume's tmp Dir
-        diskBalancerTmpDir = destVolume.getTmpDir().toPath()
-            .resolve(DISK_BALANCER_DIR).resolve(String.valueOf(containerId));
+        diskBalancerTmpDir = getDiskBalancerTmpDir(destVolume)
+            .resolve(String.valueOf(containerId));

Review Comment:
   But I have one more doubt FileUtils.copyDirectory() will it create multiple 
parent directories if its 
missing?https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/FileUtils.html#copyDirectory(java.io.File,java.io.File,boolean).
   
   However if we see our old implementation of `constructTmpDirs` was creating 
temporary directory at wrong location which was not used by diskBalancer for 
container movement and still during diskBalancer move process it is created at 
the correct location although it was not initialised during start of balancer. 
So this proves that `FileUtils.copyDirectory()` will create destination tmp 
directory with missing parents if it doesn't exists.



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