sadanand48 commented on a change in pull request #2747:
URL: https://github.com/apache/ozone/pull/2747#discussion_r731902398



##########
File path: 
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java
##########
@@ -433,7 +433,18 @@ protected void rename(final Path src, final Path dst,
       // if doesn't have TO_TRASH option, just pass the call to super
       super.rename(src, dst, options);
     } else {
-      rename(src, dst);
+      OFSPath dstpath = new OFSPath(dst);

Review comment:
       @mukul1987 problem lies 
[here](https://github.com/apache/hadoop/blob/616cea2e8068e990d24057d2b0d6090f35e21371/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java#L145
 ) where in the destination path is getting constructed.
   ` } else {
           Path trashPath = this.makeTrashRelativePath(trashCurrent, path);`
   
   `trashCurrent ` for  o3fs : /.Trash/sadanand.shenoy/Current
   ` trashCurrent` for ofs : 
ofs:/volume22368/bucket38935/.Trash/sadanand.shenoy/Current
   
   `path` for o3fs:  keyToBeDeleted
   `path `for ofs: /volume22368/bucket38935/keyToBeDeleted
   
   For ofs , the `path` variable includes the volume and bucket name .
   One way this could be solved is by overriding `movetoTrash(Path path)` in 
TrashPolicyOzone.java but that would require duplicating around 70 lines of 
code.




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