Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-18144

getTrashRoot/s in ViewFileSystem should return viewFS path, not targetFS path

    XMLWordPrintableJSON

Details

    Description

      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.

        

      Attachments

        Activity

          People

            xinglin Xing Lin
            xinglin Xing Lin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 6h 10m
                6h 10m