hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Wang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-10883) `getTrashRoot`'s behavior is not consistent in DFS after enabling EZ.
Date Wed, 21 Sep 2016 20:05:20 GMT

    [ https://issues.apache.org/jira/browse/HDFS-10883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15511006#comment-15511006

Andrew Wang commented on HDFS-10883:

I think the second behavior is more consistent, because of the case Weichiu mentioned with
nested EZs. That is, {{getTrashRoot("/")}} should return {{/.Trash/USER}}. I don't know why
there is a special case.

I tried making this change (removing the isRoot special case), and it looks like we missed
a test case asserting this behavior in TestEncryptionZones and TestNestedEncryptionZones.

[~yuanbo] do you want to work on this? Else I can provide a patch.

> `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

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

View raw message