hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lantao Jin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-11102) Deleting .Trash without -skipTrash should be confirmed
Date Sat, 05 Nov 2016 05:22:58 GMT

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

Lantao Jin commented on HDFS-11102:
-----------------------------------

[~raviprak] I agree yes/no confirmation is not a graceful solution, so I open another ticket
[HDFS-11111|https://issues.apache.org/jira/browse/HDFS-11111] to discuss another way to handle
this incident issue.

> Deleting .Trash without -skipTrash should be confirmed
> ------------------------------------------------------
>
>                 Key: HDFS-11102
>                 URL: https://issues.apache.org/jira/browse/HDFS-11102
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs
>            Reporter: Lantao Jin
>
> As a Hadoop DEVOPS, I saw lots of cases that user delete their data by mistake.  Most
of them can be recovered from trash but the rest ones were not luck.
> A system can’t guess user's purpose,but a good system should help user to avoid their
mistakes.
> There is a very common case like:
> If a user want to delete some dir from HDFS, they may use:
> {code}
> hadoop -fs -rm -r /user/someone/pathToBeDelete
> {code}
> The directory /user/someone/pathToBeDelete will move into 
> {code}
> /user/someone/.Trash/current/user/someone/pathToBeDelete
> {code}
> If user want delete it permanently, option "-skipTrash" can be attached. That's the design
and Hadoop knows the user's purpose well.
> Usually, user didn't use "skipTrash" for safety consideration. That's good till now.
> But the purpose is to delete some data for saving more space. Then the user begin to
delete it from Trash with the below command:
> {code}
> hadoop -fs -rm -r /user/someone/ .Trash
> {code}
> Why not just delete "/user/someone/.Trash/current/user/someone/pathToBeDelete" is that
because the user knows only pathToBeDelete in trash directory now.
> The trash include pathToBeDelete will be deleted permanently.
> *But Wait! Do you see the blank space before the dot?*
> If you also type this command by "copy-paste" include some space or invisible char, the
whole /user/someone directory and the whole /user/someone/.Trash will be deleted unfortunately.
*Jesus, that's means the directory /user/someone is deleted permanently and unexpectedly!*
> So I think *any ".Trash" word appears in the "rm" command without "skip" should be launched
a double checking by system to help people to avoid their mistake.*
> If you also agree this design, I will offer a patch.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message