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

`getTrashRoot`'s behavior is not consistent in DFS after enabling EZ.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha2
    • None
    • None
    • Reviewed
    • Hide
      If root path / is an encryption zone, the old DistributedFileSystem#getTrashRoot(new Path("/")) returns
      /user/$USER/.Trash
      which is a wrong behavior. The correct value should be
      /.Trash/$USER
      Show
      If root path / is an encryption zone, the old DistributedFileSystem#getTrashRoot(new Path("/")) returns /user/$USER/.Trash which is a wrong behavior. The correct value should be /.Trash/$USER

    Description

      Let's say root path ("/") is the encryption zone, and there is a file called "/test" in root path.

      dfs.getTrashRoot(new Path("/"))
      

      returns "/user/$USER/.Trash",
      while

      dfs.getTrashRoot(new Path("/test"))
      

      returns "/.Trash/$USER".
      The first behavior is not correct. Since root path is the encryption zone, it's more reasonable to return "/.Trash/$USER" no matter what the path is.

      Attachments

        1. HDFS-10883-test-case.txt
          2 kB
          Yuanbo Liu
        2. HDFS-10883.004.patch
          17 kB
          Yuanbo Liu
        3. HDFS-10883.003.patch
          16 kB
          Yuanbo Liu
        4. HDFS-10883.002.patch
          16 kB
          Yuanbo Liu
        5. HDFS-10883.001.patch
          3 kB
          Yuanbo Liu

        Issue Links

          Activity

            People

              yuanbo Yuanbo Liu
              yuanbo Yuanbo Liu
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: