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

Jonathan Coveney commented on PIG-3183:
---------------------------------------

So obviously this isn't a huge change and it is reasonable to make this work in 
the same way that hadoop's removal commands work. The only thing that holds me 
back is a sort of innate aversion to "rm *" being able to completely whack your 
files. Obviously in any environment this is generally the case but since in the 
past this wasn't the case, it just feels...dangerous. Perhaps we want to 
consider adding configuration (off by default) that makes it throw an error if 
you try to delete more than one file? Would love to hear if anyone else feels 
the hesitation that I do.
                
> rm or rmf commands should respect globbing/regex of path
> --------------------------------------------------------
>
>                 Key: PIG-3183
>                 URL: https://issues.apache.org/jira/browse/PIG-3183
>             Project: Pig
>          Issue Type: Improvement
>          Components: grunt
>    Affects Versions: 0.10.0
>            Reporter: Prashant Kommireddi
>            Assignee: Prashant Kommireddi
>             Fix For: 0.12
>
>         Attachments: PIG-3183.patch
>
>
> Hadoop fs commands support globbing during deleting files/dirs. Pig is not 
> consistent with this behavior and seems like we could change rm/rmf commands 
> to do the same.
> For eg:
> {code}
> localhost:pig pkommireddi$ ls -ld out*
> drwxr-xr-x  12 pkommireddi  SF\domain users  408 Feb 13 01:09 out
> drwxr-xr-x   2 pkommireddi  SF\domain users   68 Feb 13 01:16 out1
> drwxr-xr-x   2 pkommireddi  SF\domain users   68 Feb 13 01:16 out2
> localhost:pig pkommireddi$ bin/pig -x local
> grunt> rmf out*
> grunt> quit
> localhost:pig pkommireddi$ ls -ld out*
> drwxr-xr-x  12 pkommireddi  SF\domain users  408 Feb 13 01:09 out
> drwxr-xr-x   2 pkommireddi  SF\domain users   68 Feb 13 01:16 out1
> drwxr-xr-x   2 pkommireddi  SF\domain users   68 Feb 13 01:16 out2
> {code}
> Ideally, the user would expect "rmf out*" to delete all of the above dirs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to