umamaheswararao commented on a change in pull request #941:
URL: https://github.com/apache/hadoop-ozone/pull/941#discussion_r428181772



##########
File path: 
hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/OFSPath.java
##########
@@ -238,4 +248,23 @@ static String getTempMountBucketNameOfCurrentUser() throws 
IOException {
     String username = UserGroupInformation.getCurrentUser().getUserName();
     return getTempMountBucketName(username);
   }
+
+  /**
+   * Return trash root for the given path.
+   * @return trash root for the given path
+   */
+  public Path getTrashRoot() {
+    try {
+      String username = UserGroupInformation.getCurrentUser().getUserName();
+      URI uri = new URIBuilder().setScheme(OZONE_OFS_URI_SCHEME)

Review comment:
       Should it be first username and then .Trash ? like 
ofs:///vol1/bucket1/username/.Trash  ?
   
   This is default iml at FileSystem.java
   ```
   
    /**
      * Get the root directory of Trash for current user when the path specified
      * is deleted.
      *
      * @param path the trash root of the path to be determined.
      * @return the default implementation returns {@code /user/$USER/.Trash}
      */
     public Path getTrashRoot(Path path) {
       return this.makeQualified(new Path(getHomeDirectory().toUri().getPath(),
           TRASH_PREFIX));
     }
   ```
   CC: @mukul1987 @sadanand48 @arp7 : I think this should be checked with 
Sadanand implementation as well to be in sync?




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

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