[ 
https://issues.apache.org/jira/browse/HDFS-8831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiaoyu Yao updated HDFS-8831:
-----------------------------
    Attachment: HDFS-8831.03.patch

Update patch v03 based on [~arpit99]'s feedback. Please review, thanks!

bq. DistributedFileSystem.java:2326: We can skip the call to dfs.getEZForPath 
if isHDFSEncryptionEnabled is false to avoid extra RPC call when TDE is not 
enabled.
Good point. Fixed. 

bq. FileSystem.java:2701: Can we define .Trash as a constant somewhere?

Add FileSystem#TRASH_PREFIX for ".Trash"

bq.Trash.java:98: Avoid extra RPC for log statement. Can we cache the 
currentTrashDir some time earlier?

Every path to be deleted may have different currentTrashDir. Move the INFO log 
to TrashPolicyDefault.java to avoid extra RPC for log.

bq. TrashPolicy.java:48: I don't think we should mark it as deprecated. While 
the TrashPolicyDefault no longer uses the home parameter other implementations 
may be passing a different value here in theory.
TrashPolicy.java:57: Also we should have a default implementation of this 
routine else it will be a backward incompatible change (will break existing 
implementations of this public interface).
TrashPolicy.java:83: Need default implementation. It can just throw 
UnsupportedOperationException which should be handled by the caller.
TrashPolicy.java:92: Need default implementation. It can just throw 
UnsupportedOperationException which should be handled by the caller.

Agree and fixed. 

bq. TrashPolicy.java:108: We should leave the old method in place to keep the 
public interface backwards compatible. Perhaps to be conservative we should 
respect the 'home' parameter if one is passed in instead of using 
Filesystem#getTrashRoot?

Agree and fixed. 


> Trash Support for deletion in 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
>         Attachments: HDFS-8831-10152015.pdf, HDFS-8831.00.patch, 
> HDFS-8831.01.patch, HDFS-8831.02.patch, HDFS-8831.03.patch
>
>
> 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