[
https://issues.apache.org/jira/browse/HADOOP-12358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14720074#comment-14720074
]
Allen Wittenauer commented on HADOOP-12358:
-------------------------------------------
bq.Only admins who want to use this feature would consider this aspect and by
default it is disabled.
If I have to enable this feature, why wouldn't I just enable trash and/or
snapshots which are a) significantly lower risk and b) almost certainly won't
break my existing workflows in a surprising way?
bq. Also, the feature is exposed only via FSShell, so MR jobs using delete API
will not be impacted.
There are a TON of workflows that look like:
{code}
hadoop fs -rm -r /workdir
yarn jar job.jar
{code}
where job.jar then runs multiple TB to /workdir. Enabling this will break a
large number of those jobs.
bq. It is a useful feature because it will reduce the occurrences of cases
where admins deleted large amount of data inadvertently.
No, it won't. We'll just write scripts that bombard the NN and delete
everything over multiple RPCs or we'll write our own code to bypass the FsShell
completely.
But here, I'll give you an out. I'll remove my -1 in one of two ways:
* This limitation is tied to a flag on the rm command. Then we can write some
shell code to utilize .hadooprc to build subcommand aliasing. (.e.g., alias
"hadoop fs -rm"="hadoop fs -rm -safely" or whatever.) Just be aware that this
will only work in trunk.
and/or
* This limitation is tied to a new fs command.
Making it system wide is not an option and will cause widespread destruction.
> 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, HADOOP-12358.01.patch,
> HADOOP-12358.02.patch, HADOOP-12358.03.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)