[ https://issues.apache.org/jira/browse/HDFS-10756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15432606#comment-15432606 ]
Wei-Chiu Chuang commented on HDFS-10756: ---------------------------------------- Hello [~yuanbo], nice work! On top of Xiao's comment, I have a few quick comments: * when logging an exception, please make sure to log the exception itself. The exception itself (including the log message and the stacktrace) is a useful information when debugging. * can you also verify the behavior of getTrashRoot() with a non-EZ path? Also, I would like to point out that for any downstream applications that use the proposed GETTRASHROOT operation, it is important to note that the application should not assume the trash directory returned exists. Downstream applications should have some way of handling this, and create trash directory with appropriate sticky bit and permission. See HDFS-10324 for discussion. > 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 > > > 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-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org