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

Viraj Jasani commented on HDFS-15982:
-------------------------------------

{quote}So – essentially we change the default behavior of webhdfs delete 
operation.
{quote}
Although this is correct, however we are actually aligning webhdfs delete 
behaviour with delete command. As far as API endpoint is concern, we are 
introducing new query param (skiptrash) similar to skipTrash argument with 
delete command.
{quote}You will want to make sure to add a release note.
{quote}
Sure thing, since this is incompatible change w.r.t DELETE API's default 
behaviour.
{quote}Also, we should consider making the delete behavior of 
DistributedFileSystem consistent with webhdfs/httpfs (i.e. do not skip trash by 
default)
{quote}
With this Jira, if fs.trash.interval > 0, *default* behavior of *delete 
command* as well as *delete http API* both will be to move deleted data to 
trash until trash interval (so far, only delete command used to do this). 
Hence, the changes proposed are at NamenodeWebHdfsMethods API endpoint level. 
Hence, I am not sure if we should perform any changes at server side i.e at 
DistributedFileSystem#delete(Path f, boolean recursive) level. Sorry if I 
misunderstood your concern. But if you meant if we should not skip trash by 
default (whether we use delete command or delete http API endpoint), then yes, 
changes are done appropriately.

> Deleted data using HTTP API should be saved to the trash
> --------------------------------------------------------
>
>                 Key: HDFS-15982
>                 URL: https://issues.apache.org/jira/browse/HDFS-15982
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: hdfs, webhdfs
>            Reporter: Bhavik Patel
>            Assignee: Viraj Jasani
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: Screenshot 2021-04-23 at 4.19.42 PM.png, Screenshot 
> 2021-04-23 at 4.36.57 PM.png
>
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> If we delete the data from the Web UI then it should be first moved to 
> configured/default Trash directory and after the trash interval time, it 
> should be removed. currently, data directly removed from the system[This 
> behavior should be the same as CLI cmd]
> This can be helpful when the user accidentally deletes data from the Web UI.
> Similarly we should provide "Skip Trash" option in HTTP API as well which 
> should be accessible through Web UI.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to