You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Jameson Li <ho...@gmail.com> on 2011/07/05 04:59:52 UTC
why pig stream "grep" not work, but "awk index" is well
I have a doubt that:
sometime when I run the pig code:
c = stream b through `grep "spider"`;
It will return the error message:
Received Error while processing the map plan: 'grep "spider" ' failed with
exit status: 1
But when I use the pig code:
c = stream b through `awk '{a=index($0,"spider");if(a!=0){print $0};}'`;
It will work normal.
Why?
Thanks very much.
Re: why pig stream "grep" not work, but "awk index" is well
Posted by Jameson Li <ho...@gmail.com>.
Yes. I am sure.
2011/7/6 Dmitriy Ryaboy <dv...@gmail.com>
> Works for me.
>
> Make sure you have grep on the path of all your nodes?
>
> D
>
> On Mon, Jul 4, 2011 at 7:59 PM, Jameson Li <ho...@gmail.com> wrote:
> > I have a doubt that:
> >
> > sometime when I run the pig code:
> > c = stream b through `grep "spider"`;
> >
> > It will return the error message:
> > Received Error while processing the map plan: 'grep "spider" ' failed
> with
> > exit status: 1
> >
> > But when I use the pig code:
> > c = stream b through `awk '{a=index($0,"spider");if(a!=0){print $0};}'`;
> >
> > It will work normal.
> >
> > Why?
> >
> > Thanks very much.
> >
>
Re: why pig stream "grep" not work, but "awk index" is well
Posted by Dmitriy Ryaboy <dv...@gmail.com>.
Works for me.
Make sure you have grep on the path of all your nodes?
D
On Mon, Jul 4, 2011 at 7:59 PM, Jameson Li <ho...@gmail.com> wrote:
> I have a doubt that:
>
> sometime when I run the pig code:
> c = stream b through `grep "spider"`;
>
> It will return the error message:
> Received Error while processing the map plan: 'grep "spider" ' failed with
> exit status: 1
>
> But when I use the pig code:
> c = stream b through `awk '{a=index($0,"spider");if(a!=0){print $0};}'`;
>
> It will work normal.
>
> Why?
>
> Thanks very much.
>