Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig, mail # user - why pig stream "grep" not work, but "awk index" is well


Copy link to this message
-
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.