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

Viraj Jasani edited comment on HDFS-15982 at 5/5/21, 6:30 AM:
--------------------------------------------------------------

 
{quote}I was following the older jira.

[~daryn] had a comment:{color:#172b4d} {color}

{color:#172b4d}You cannot or should not create a default fs and parse a path in 
the NN. It's very dangerous. Give me some time (that I don't have) and I'd 
likely come up with a nasty exploit.{color}
{quote}
This seems interesting. Although yes, this is default fs, but it is 
instantiated from WebHdfs config object only (which is used by all endpoints in 
NamenodeWebHdfsMethods). Is WebHdfs server implementation used for any other 
FileSystem (from current and future viewpoints)?
{quote}Router part needs to be checked again and confirmed, Trash itself has 
issues with Router(There are Jiras). So, if Trash becomes true by default, I 
doubt delete through Router don't break or moves to some weird place.
{quote}
Oops, I was not aware of existing concerns with router path resolution within 
Trash. I think this is fair point to make this Jira a compatible change w.r.t 
DELETE REST API calls. Let me provide an addendum for trunk to bring default 
value of skiptrash as true.

branch-3.3 backport PR#2925 is pending. Shall we get it in and then I can 
provide addendum for both trunk and branch-3.3 for clean history?

Btw [~ayushtkn] you might also want to check screenshots attached on this Jira 
to take a look at how skiptrash is handled from Web UI.


was (Author: vjasani):
{quote}I was following the older jira.

[~daryn] had a comment:
{quote}You cannot or should not create a default fs and parse a path in the NN. 
It's very dangerous. Give me some time (that I don't have) and I'd likely come 
up with a nasty exploit.
{quote}{quote}
This seems interesting. Although yes, this is default fs, but it is 
instantiated from WebHdfs config object only (which is used by all endpoints in 
NamenodeWebHdfsMethods). Is WebHdfs server implementation used for any other 
FileSystem (from current and future viewpoints)?
{quote}Router part needs to be checked again and confirmed, Trash itself has 
issues with Router(There are Jiras). So, if Trash becomes true by default, I 
doubt delete through Router don't break or moves to some weird place.
{quote}
Oops, I was not aware of existing concerns with router path resolution with 
Trash. I think this is fair point to make this Jira a compatible change w.r.t 
DELETE REST API calls. Let me provide an addendum for trunk to bring default 
value of skiptrash as true. branch-3.3 backport PR#2925 is pending. Shall we 
get it in and then I can provide addendum for both trunk and branch-3.3 for 
clean history?

Btw [~ayushtkn] you might also want to check screenshots attached on this Jira 
to take a look at how skiptrash is handled from Web UI.

> 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, hdfs-client, httpfs, 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: 12h 10m
>  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