You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by JAGANADH G <ja...@gmail.com> on 2012/02/24 08:27:07 UTC

Pig fails to read from HDFS

Hi All
Is there solution for issue discussed here
https://groups.google.com/a/cloudera.org/group/cdh-user/browse_thread/thread/e99bf7a5ebdfa6fc/6e532aad085799b9?pli=1
-- 
**********************************
JAGANADH G
http://jaganadhg.in
*ILUGCBE*
http://ilugcbe.org.in

Re: Pig fails to read from HDFS

Posted by JAGANADH G <ja...@gmail.com>.
@Vivek and @Srinivas:
Thanks for the solution

On Fri, Feb 24, 2012 at 7:00 PM, Srinivas Reddy <pi...@gmail.com>wrote:

> TryBelow:-
>
> A = load 'ngt/ngt.csv' using PigStorage('\t') as(ngram:chararray,
> year:int,mc:int,pc:int,vc:int);
> B = group A by ngram;
> C = foreach B generate group, COUNT(A);
> store C into 'ngout/out.txt' using PigStorage('\t');
>
> Regards,
> On Fri, Feb 24, 2012 at 3:19 AM, Vivek Padmanabhan <pvivek@yahoo-inc.com
> >wrote:
>
> > I think the problem is with the COUNT( ngram) invoked with a chararray
> >
> > http://pig.apache.org/docs/r0.8.1/piglatin_ref2.html#COUNT
> >
> > Thanks
> > Vivek
> >
> > On 2/24/12 12:57 PM, "JAGANADH G" <ja...@gmail.com> wrote:
> >
> > > Hi All
> > > Is there solution for issue discussed here
> > >
> >
> https://groups.google.com/a/cloudera.org/group/cdh-user/browse_thread/thread/e
> > > 99bf7a5ebdfa6fc/6e532aad085799b9?pli=1
> >
> >
>



-- 
**********************************
JAGANADH G
http://jaganadhg.in
*ILUGCBE*
http://ilugcbe.org.in

Re: Pig fails to read from HDFS

Posted by Srinivas Reddy <pi...@gmail.com>.
TryBelow:-

A = load 'ngt/ngt.csv' using PigStorage('\t') as(ngram:chararray,
year:int,mc:int,pc:int,vc:int);
B = group A by ngram;
C = foreach B generate group, COUNT(A);
store C into 'ngout/out.txt' using PigStorage('\t');

Regards,
On Fri, Feb 24, 2012 at 3:19 AM, Vivek Padmanabhan <pv...@yahoo-inc.com>wrote:

> I think the problem is with the COUNT( ngram) invoked with a chararray
>
> http://pig.apache.org/docs/r0.8.1/piglatin_ref2.html#COUNT
>
> Thanks
> Vivek
>
> On 2/24/12 12:57 PM, "JAGANADH G" <ja...@gmail.com> wrote:
>
> > Hi All
> > Is there solution for issue discussed here
> >
> https://groups.google.com/a/cloudera.org/group/cdh-user/browse_thread/thread/e
> > 99bf7a5ebdfa6fc/6e532aad085799b9?pli=1
>
>

Re: Pig fails to read from HDFS

Posted by Vivek Padmanabhan <pv...@yahoo-inc.com>.
I think the problem is with the COUNT( ngram) invoked with a chararray

http://pig.apache.org/docs/r0.8.1/piglatin_ref2.html#COUNT

Thanks
Vivek 

On 2/24/12 12:57 PM, "JAGANADH G" <ja...@gmail.com> wrote:

> Hi All
> Is there solution for issue discussed here
> https://groups.google.com/a/cloudera.org/group/cdh-user/browse_thread/thread/e
> 99bf7a5ebdfa6fc/6e532aad085799b9?pli=1