hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao Chen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-10756) Expose getTrashRoot to HTTPFS and WebHDFS
Date Thu, 27 Oct 2016 21:27:58 GMT

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

Xiao Chen commented on HDFS-10756:
----------------------------------

Thanks [~yuanbo] for the new rev. Some comments, mostly nits:

HttpFSFileSystem:
- Would prefer to have a new TRASH_ROOT_JSON instead of mixing with {{HOME_DIR_JSON}}. And
update both sides to use this.

In the documentation
- Hoping we can add something like [javadoc from DFS|https://github.com/apache/hadoop/blob/dd4ed6a587bf9cc57eb38d7957d8a907901a1cac/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java#L2471]
to explain this overall.
- Suggest to add a link to {{TransparentEncryption.html#Rename_and_Trash_considerations}}
as well, to help explain the trash-over-EZ logic.
- {{if the path is an encrypted zone path}}: s/if/If/g, s/is an encrypted zone path/is in
an encryption zone/g.
- and user has permission to the path
I believe the javadoc of DFS will take care of this. Also ping [~andrew.wang] for his view
regarding this: if user has no perm, we return default as DFS does. While this is consistent
and has a warn log, I find it a somewhat surprising behavior. Any advice (as-is or throw or
sth else)? Sorry I should have asked when I propose the change earlier.
- In the example {{"Path": "/user/szetszwo/.Trash"}}, let's use {{username}}, or a more general
name like alice/bob, as TransparentEncryption.html did.

BaseTestHttpFSWith
- pretty trivial, but {{foo}} is a less aggressive word than {{fool}}. I suggest we use the
former as var names. :)

TestHttpFSServer.java:
- extra line after {{getPath}} method, inside and after {{testGetTrashRoot}} method. Basically
please use 1 line break.
- it's very thorough to test GETTRASHROOT with delegation tokens. But need to connect and
assert after having the url. :)


> Expose getTrashRoot to HTTPFS and WebHDFS
> -----------------------------------------
>
>                 Key: HDFS-10756
>                 URL: https://issues.apache.org/jira/browse/HDFS-10756
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: encryption, httpfs, webhdfs
>            Reporter: Xiao Chen
>            Assignee: Yuanbo Liu
>         Attachments: HDFS-10756.001.patch, HDFS-10756.002.patch, HDFS-10756.003.patch,
HDFS-10756.004.patch
>
>
> Currently, hadoop FileSystem API has [getTrashRoot|https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java#L2708]
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|https://github.com/apache/hadoop/blob/trunk/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java#L2485]
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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message