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

Konstantin Shvachko commented on HADOOP-6344:
---------------------------------------------

There are some questionable things going on in moveToTrash(), which should be 
addressed in HADOOP-6345.

As for the patch I think it does what it is intended for, namely not removing 
silently the directory if the quota exceeded or any other exception is thrown 
while creating a trash directory. I first thought that the directory will still 
be removed in FsShell.delete() if mkDirs() returned false. But it turns out 
that HDFS mkDirs() never returns false: the result is either true or an 
exception.

+1 one for the patch.

> rm and rmr fail to correctly move the user's files to the trash prior to 
> deleting when they are over quota.  
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6344
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6344
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.20.0, 0.20.1, 0.21.0, 0.22.0
>            Reporter: gary murry
>         Attachments: HDFS-740-for-Y20.patch, HDFS-740.patch
>
>
> With trash turned on, if a user is over his quota and does a rm (or rmr), the 
> file is deleted without a copy being placed in the trash.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to