|
|
-
why pig stream "grep" not work, but "awk index" is well
Jameson Li 2011-07-05, 02:59
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
Dmitriy Ryaboy 2011-07-05, 21:20
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 <[EMAIL PROTECTED]> 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
Jameson Li 2011-07-06, 08:34
Yes. I am sure. 2011/7/6 Dmitriy Ryaboy <[EMAIL PROTECTED]>
> 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 <[EMAIL PROTECTED]> 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. > > >
|
|
All projects made searchable here are trademarks of the Apache Software Foundation.
Service operated by
Sematext