Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-10756

Expose getTrashRoot to HTTPFS and WebHDFS

    XMLWordPrintableJSON

Details

    • Reviewed
    • Hide
      "getTrashRoot" returns a trash root for a path. Currently in DFS if the path "/foo" is a normal path, it returns "/user/$USER/.Trash" for "/foo" and if "/foo" is an encrypted zone, it returns "/foo/.Trash/$USER" for the child file/dir of "/foo". This patch is about to override the old "getTrashRoot" of httpfs and webhdfs, so that the behavior of returning trash root in httpfs and webhdfs are consistent with DFS.
      Show
      "getTrashRoot" returns a trash root for a path. Currently in DFS if the path "/foo" is a normal path, it returns "/user/$USER/.Trash" for "/foo" and if "/foo" is an encrypted zone, it returns "/foo/.Trash/$USER" for the child file/dir of "/foo". This patch is about to override the old "getTrashRoot" of httpfs and webhdfs, so that the behavior of returning trash root in httpfs and webhdfs are consistent with DFS.

    Description

      Currently, hadoop FileSystem API has getTrashRoot to determine trash directory at run time. Default trash dir is under /user/$USER

      For an encrypted file, since moving files between/in/out of EZs are not allowed, when an EZ file is deleted via CLI, it calls in to DFS implementation to move the file to a trash directory under the same EZ.

      This works perfectly fine for CLI users or java users who call FileSystem API. But for users via httpfs/webhdfs, currently there is no way to figure out what the trash root would be. This jira is proposing we add such interface to httpfs and webhdfs.

      Attachments

        1. HDFS-10756.007.patch
          31 kB
          Yuanbo Liu
        2. HDFS-10756.006.patch
          31 kB
          Yuanbo Liu
        3. HDFS-10756.005.patch
          32 kB
          Yuanbo Liu
        4. HDFS-10756.004.patch
          28 kB
          Yuanbo Liu
        5. HDFS-10756.003.patch
          24 kB
          Yuanbo Liu
        6. HDFS-10756.002.patch
          32 kB
          Yuanbo Liu
        7. HDFS-10756.001.patch
          28 kB
          Yuanbo Liu

        Issue Links

          Activity

            People

              yuanbo Yuanbo Liu
              xiaochen Xiao Chen
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: