[
https://issues.apache.org/jira/browse/HDFS-16032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17351543#comment-17351543
]
Ayush Saxena commented on HDFS-16032:
-------------------------------------
Trash is a FsShell concept, I would argue if it belongs to DfsClient. Though we
have a config to enforce whether it should be enabled or not to prevent
compatibility and with this on, but this would be just restricted to HDFS or
say DistributedFileSystem, In general Downstream projects using the API's don't
make specific assumptions related to FileSystem types changing. So, making a
DFS only enhancement doesn't seems to be very right.
Maybe just having a util method, like FileUtils.delete(..) or
FileUtils.deleteWithTrash(..) can be exposed, if something of that sort isn't
already there, which can be generic to all the FileSystems and would keep a
strict control in hands of the Applications, and applications can adopt to it
if there is a need to that.
Secondly, initially the trash was to prevent user level accidents, the API
calls are supposed to be coming from some fairly stable applications, knowing
what they are doing, if the application wanted to move to trash, or have some
precautions, they could have coded that way, there are ways to do that....
> DFSClient#delete supports Trash
> --------------------------------
>
> Key: HDFS-16032
> URL: https://issues.apache.org/jira/browse/HDFS-16032
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hadoop-client, hdfs
> Affects Versions: 3.4.0
> Reporter: Xiangyi Zhu
> Priority: Major
> Labels: pull-request-available
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Currently, HDFS can only move deleted data to Trash through Shell commands.
> In actual scenarios, most of the data is deleted through DFSClient Api. I
> think it should support Trash.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]