You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/02/26 01:30:00 UTC

[jira] [Work logged] (HADOOP-18144) getTrashRoot/s in ViewFileSystem should return viewFS path, not targetFS path

     [ https://issues.apache.org/jira/browse/HADOOP-18144?focusedWorklogId=733445&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-733445 ]

ASF GitHub Bot logged work on HADOOP-18144:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Feb/22 01:29
            Start Date: 26/Feb/22 01:29
    Worklog Time Spent: 10m 
      Work Description: xinglin opened a new pull request #4034:
URL: https://github.com/apache/hadoop/pull/4034


   <!--
     Thanks for sending a pull request!
       1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
       2. Make sure your PR title starts with JIRA issue id, e.g., 'HADOOP-17799. Your PR title ...'.
   -->
   
   ### Description of PR
   
   Modified getTrashRoot/s to return viewFS path for the new trash location. 
   
    If CONFIG_VIEWFS_TRASH_ROOT_UNDER_MOUNT_POINT_ROOT is not set, return the default trash root (a targetFS path) from targetFS.
     
   When CONFIG_VIEWFS_TRASH_ROOT_UNDER_MOUNT_POINT_ROOT is set to true,
      1) If path p is in a snapshot or encryption zone, or when it is in the
          fallback FS, return the default trash root (a targetFS path) from targetFS.
       2) else, return a viewFS path for the trash root under the root of the
          mount point (/mntpoint/.Trash/{user}).
   
   ### How was this patch tested?
   
   Run unit tests manually from intellij. 
   
   
   
   


-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 733445)
    Remaining Estimate: 0h
            Time Spent: 10m

> getTrashRoot/s in ViewFileSystem should return viewFS path, not targetFS path
> -----------------------------------------------------------------------------
>
>                 Key: HADOOP-18144
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18144
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: common
>            Reporter: Xing Lin
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> It is probably incorrect that we return a targetFS path from getTrashRoot() in ViewFileSystem, as that path will be used later on by ViewFileSystem in other operations, such as rename. ViewFileSystem is assuming the path that it receives is a viewFS path, but not a target FS path. For example, rename() in ViewFileSystem will call getUriPath() for src/dst path, which will remove the scheme/authority and then try to resolve the path-only component. It thus sometimes leads to incorrect path resolution, as we are doing the path resolution again on a targetFS path. 
>  
> On the other hand, it is not always trivial/feasible to determine the correct viewFS path for a given trash root in targetFS path. 
> Example:
> Assume we have a mount point for /user/foo -> abfs:/containerA
> User foo calls getTrashRoot("/a/b/c") and "/a/b/c" does not match any mount point. We fall back to the fallback hdfs, which by default returns hdfs://localhost/user/foo/.Trash. In this case, it is incorrect to return the trash root as viewfs:/user/foo, as it will be resolved to the abfs mount point, instead of the fallback hdfs.
>   



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org