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

jeanlyn commented on MAPREDUCE-6597:
------------------------------------

Thanks [~szetszwo] for review! I think the delete operation is unsafe when 
running in production environment. Hence, i use move the path to trash by 
default. Recently, we have a case: somebody use *distcp* and and set the target 
path argument to the wrong place with delete option,it delete all files from 
source path. May be we can keep the same behavior with *Delete.class* of the 
*FsShell*, when the trash is enable, try to move the file the trash first, and 
only delete them when the trash is unable or given the *skipTrash* option?
What do you think?

> Distcp should move the path to trash when delete missing path from source
> -------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-6597
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6597
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: distcp
>            Reporter: jeanlyn
>            Assignee: jeanlyn
>            Priority: Minor
>         Attachments: MAPREDUCE-6597.001.patch, MAPREDUCE-6597.002.patch
>
>
> For now, when we use the *distcp* with the delete option, the path will be 
> deleted when missing in the source. We should add the option *skipTrash* to 
> control the behavior. if  *skipTrash* missing, we will move the path to the 
> trash first rather than delete them directly.



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

Reply via email to