[
https://issues.apache.org/jira/browse/HADOOP-12358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14712283#comment-14712283
]
Andrew Wang commented on HADOOP-12358:
--------------------------------------
[~aw] it's off by default in the patch, so compat looks satisfied
Hi [~xyao] if I understand the patch, it calls getContentSummary beforehand
which is a recursive operation. Means that doing rm with this option on is now
one RPC per directory in the deleted tree, much more expensive.
I can understand a safety mechanism for not deleting / (seen that before in
Unix), but this is a novel one and comes at a pretty high cost. If users want
more safety, they shouldn't use -skipTrash. -skipTrash is like -f, do we really
need to nanny users even when they've already explicitly opted out of our
existing safety mechanism?
There's also some danger of client OOMs when trying to delete a large
directory, since getContentSummary is not using the iterator-based listing.
That's an issue we can fix in a different JIRA though.
> FSShell should prompt before deleting directories bigger than a configured
> size
> -------------------------------------------------------------------------------
>
> Key: HADOOP-12358
> URL: https://issues.apache.org/jira/browse/HADOOP-12358
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Reporter: Xiaoyu Yao
> Assignee: Xiaoyu Yao
> Attachments: HADOOP-12358.00.patch
>
>
> We have seen many cases with customers deleting data inadvertently with
> -skipTrash. The FSShell should prompt user if the size of the data or the
> number of files being deleted is bigger than a threshold even though
> -skipTrash is being used.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)