You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Flo Leibert <fl...@airbedandbreakfast.com> on 2012/02/15 02:19:01 UTC

fs -rmr without error

Hi -
is there a way to do a fs -rmr s3://foo/bar that doesn't result in an error
if the given directory doesn't exist?
I can imagine this is because the underlying hadoop tool gives some return
code that pig treats as an error - is there a way to force pig to not abort
on certain errors?

Thanks!
Flo

Re: fs -rmr without error

Posted by Flo Leibert <fl...@airbedandbreakfast.com>.
Awesome - that works!

On Tue, Feb 14, 2012 at 5:28 PM, Prashant Kommireddi <pr...@gmail.com>wrote:

> If you are doing this with Pig, you could use "rmf".
>
> rmf does not throw an error if the file is not present.
>
> Thanks,
> Prashant
>
>
> On Tue, Feb 14, 2012 at 5:19 PM, Flo Leibert <flo@airbedandbreakfast.com
> >wrote:
>
> > Hi -
> > is there a way to do a fs -rmr s3://foo/bar that doesn't result in an
> error
> > if the given directory doesn't exist?
> > I can imagine this is because the underlying hadoop tool gives some
> return
> > code that pig treats as an error - is there a way to force pig to not
> abort
> > on certain errors?
> >
> > Thanks!
> > Flo
> >
>

Re: fs -rmr without error

Posted by Prashant Kommireddi <pr...@gmail.com>.
If you are doing this with Pig, you could use "rmf".

rmf does not throw an error if the file is not present.

Thanks,
Prashant


On Tue, Feb 14, 2012 at 5:19 PM, Flo Leibert <fl...@airbedandbreakfast.com>wrote:

> Hi -
> is there a way to do a fs -rmr s3://foo/bar that doesn't result in an error
> if the given directory doesn't exist?
> I can imagine this is because the underlying hadoop tool gives some return
> code that pig treats as an error - is there a way to force pig to not abort
> on certain errors?
>
> Thanks!
> Flo
>