[
https://issues.apache.org/jira/browse/HDFS-10883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15510734#comment-15510734
]
Xiaoyu Yao commented on HDFS-10883:
-----------------------------------
[~yuanbo], thanks for reporting the issue and posting the patches.
bq. The second behavior is not correct. Since root path is the encryption zone,
which means all files/directories in DFS are encrypted, it's more reasonable
to return "/user/$USER/.Trash" no matter what the path is.
Taking a looking at the history of changes in getTrashRoot API, the special
case when encryption zone is created on "/" is added by HDFS-9244 to support
nested encryption zone. Before that, the API always keeps the trash of
encryption zone always under the ".Trash" directory of the encryption zone's
root. [~zhz]/[~andrew.wang], can you provide more context why this special case
is needed?
Also, we need to update the document regarding nested encryption support and
its impact to rename and Trash support.
> `getTrashRoot`'s behavior is not consistent in DFS after enabling EZ.
> ---------------------------------------------------------------------
>
> Key: HDFS-10883
> URL: https://issues.apache.org/jira/browse/HDFS-10883
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Yuanbo Liu
> Assignee: Yuanbo Liu
> Attachments: HDFS-10883-test-case.txt, HDFS-10883.001.patch
>
>
> Let's say root path ("/") is the encryption zone, and there is a file called
> "/test" in root path.
> {code}
> dfs.getTrashRoot(new Path("/"))
> {code}
> returns "/user/$USER/.Trash",
> while
> {code}
> dfs.getTrashRoot(new Path("/test"))
> {code}
> returns "/.Trash/$USER".
> The second behavior is not correct. Since root path is the encryption zone,
> which means all files/directories in DFS are encrypted, it's more reasonable
> to return "/user/$USER/.Trash" no matter what the path is.
> Please see the attachment to know how to reproduce this issue.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]