mukul1987 commented on a change in pull request #2747:
URL: https://github.com/apache/ozone/pull/2747#discussion_r731749049
##########
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:
I guess the problem is in
`
public Path getTrashRoot() {
if (!this.isKey()) {
throw new RuntimeException("Volume or bucket doesn't have trash
root.");
}
try {
final String username =
UserGroupInformation.getCurrentUser().getShortUserName();
final Path pathRoot = new Path(
OZONE_OFS_URI_SCHEME, authority, OZONE_URI_DELIMITER);
final Path pathToVolume = new Path(pathRoot, volumeName);
final Path pathToBucket = new Path(pathToVolume, bucketName);
final Path pathToTrash = new Path(pathToBucket, TRASH_PREFIX);
return new Path(pathToTrash, username);
} catch (IOException ex) {
throw new RuntimeException("getTrashRoot failed.", ex);
}
}
`
@smengcl can you please confirm why we have volumename and bucketname in the
trash path ?
--
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]