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

Xiaoyu Yao commented on HADOOP-12358:
-------------------------------------

@Andrew wang, thanks for the feedback. Good point for mentioning the 
getContentSummary() performance issue. However, compare with the irrecoverable 
data loss due to various user mistakes *without confirmation*. Some Unix best 
practices even suggest  {code} alias rm="rm -i" {code} to avoid dangerous 
deletions without confirmation. I think there are values to warn HDFS users 
about the consequences and ensure a confirmation for dangerous deletions when 
the feature is enabled. When they see how much data will be gone after the 
confirmation, most people will be very cautious to say 'Yes'. This will save a 
lot of efforts later to recover deletions, which is extremely hard with today's 
-skipTrash option. 

bq. they shouldn't use -skipTrash. -skipTrash is like -f, 
Correct me if I'm wrong. My understanding of -skipTrash (don't make the delete 
recoverable) is different from -f (confirm unrecoverable delete).

 

> 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)

Reply via email to