[
https://issues.apache.org/jira/browse/HDFS-14320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16788248#comment-16788248
]
Hanisha Koneru commented on HDFS-14320:
---------------------------------------
Thank you [~kpalanisamy] for working on this.
The patch LGTM overall. Just one question - In
\{{NamenodeWebHdfsMethods#delete()}}, when we are moving the file to
appropriate trash directory, will {{FileSystem.get(config)}} get the default FS
of the cluster or the FS corresponding to the fullPath of the file. Do we set
the defaultFS in the configuration when initializing WebHdfs?
{code:java}
b = Trash.moveToAppropriateTrash(FileSystem.get(config),
new org.apache.hadoop.fs.Path(fullpath), config);{code}
> Support skipTrash for WebHDFS
> ------------------------------
>
> Key: HDFS-14320
> URL: https://issues.apache.org/jira/browse/HDFS-14320
> Project: Hadoop HDFS
> Issue Type: New Feature
> Components: namenode, webhdfs
> Affects Versions: 3.2.0
> Reporter: Karthik Palanisamy
> Assignee: Karthik Palanisamy
> Priority: Major
> Attachments: HDFS-14320-001.patch, HDFS-14320-002.patch,
> HDFS-14320-003.patch, HDFS-14320-004.patch, HDFS-14320-005.patch,
> HDFS-14320-006.patch, HDFS-14320-007.patch
>
>
> Files/Directories deleted via webhdfs rest call doesn't use the skiptrash
> feature, it would be deleted permanently. This feature is very important us
> because our user has deleted large directory accidentally.
> By default, Skiptrash option is set to true, skiptrash=true. Any files, Using
> CURL will be permanently deleted.
> Example:
> curl -iv -X DELETE
> "http://xxxx:50070/webhdfs/v1/tmp/sampledata?op=DELETE&user.name=hdfs&recursive=true"
>
> Use skiptrash=false, to move files to trash Instead.
> Example:
> curl -iv -X DELETE
> "http://xxxx:50070/webhdfs/v1/tmp/sampledata?op=DELETE&user.name=hdfs&recursive=true&skiptrash=false"
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]