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

Xiaoyu Yao commented on HDFS-8831:
----------------------------------

Propose to add a .Trash under the root of encryption zone without dependency on 
HDFS-8830. This per encryption zone .Trash directory lives within the zone and 
can be created at the time of the encryption zone creation. Files deleted 
within the encryption zone will be renamed/checkpointed to .Trash directory 
inside the encryption zone. For example, user foo delete a file /ez1/bar from 
an encryption zone rooted at /ez1, the file will be move to trash at 
/ez1/.Trash/foo/Current/ez1/bar. This way, we remove the dependency on 
HDFS-8830 and avoid the management overhead because we don't need to explicitly 
add trash locations (current and checkpoints) outside to the encryption zone 
root for each users' current and checkpoint directories. When the entire 
encryption zone is deleted, it should work as it is today, i.e., the root of 
the encryption zone is moved to the trash folder of the user who executed the 
deletion.

I will upload a proposal shortly that compares this with other alternatives for 
encryption zone trash support and summarize why the one proposed above is 
preferred. Any feedback and thoughts?

> Support "Soft Delete" for files under HDFS encryption zone
> ----------------------------------------------------------
>
>                 Key: HDFS-8831
>                 URL: https://issues.apache.org/jira/browse/HDFS-8831
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: encryption
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaoyu Yao
>
> Currently, "Soft Delete" is only supported if the whole encryption zone is 
> deleted. If you delete files whinin the zone with trash feature enabled, you 
> will get error similar to the following 
> {code}
> rm: Failed to move to trash: hdfs://HW11217.local:9000/z1_1/startnn.sh: 
> /z1_1/startnn.sh can't be moved from an encryption zone.
> {code}
> With HDFS-8830, we can support "Soft Delete" by adding the .Trash folder of 
> the file being deleted appropriately to the same encryption zone. 



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

Reply via email to