Instead of this,  f = join d by b.word,e by b.word;
Try to use, f = join d by d.size,e by e.countword;

I think there is a mistake in,  (b.word)



-----Original Message-----
From: manish dunani [mailto:[email protected]] 
Sent: 12 August 2013 18:17
To: [email protected]
Subject: Re: size of words+counts of words getting failed.

grunt> describe d;
d: {group: chararray,size: long}

grunt> describe e;
e: {countword: long,group: chararray}



On Mon, Aug 12, 2013 at 2:41 PM, Serega Sheypak <[email protected]>wrote:

> I suggest you to output "DESCRIBE" for "d" and "e" relation.
>
>
> 2013/8/12 manish dunani <[email protected]>
>
> > Hello Good afternoon ,
> >
> >
> > My input file contains full of text words delimited by space.
> >
> > I want to do using Pig..I already did it with map and reduce.
> > *I have to do:*
> > #get the size of words  #counts for words of particular size.
> >
> > Here are commands::
> > a = load '/user/manish/word/word.txt' as line; b = foreach a 
> > generate flatten(TOKENIZE(line)) as word; c = group b by word; d = 
> > foreach c generate group, SIZE(b.word) as size; e = foreach c 
> > generate COUNT(b.word) as countword, group; while i execute join 
> > command job failed....
> > f = join d by b.word,e by b.word;
> >
> > *Error:*
> >
> > ERROR 1066: Unable to open iterator for alias f
> >
> > org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: 
> > Unable to open iterator for alias f
> >     at org.apache.pig.PigServer.openIterator(PigServer.java:857)
> >     at
> > org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:682)
> >     at
> >
> >
> org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptP
> arser.java:303)
> >     at
> >
> >
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.ja
> va:189)
> >     at
> >
> >
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.ja
> va:165)
> >     at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
> >     at org.apache.pig.Main.run(Main.java:490)
> >     at org.apache.pig.Main.main(Main.java:111)
> >     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >     at
> >
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> ava:57)
> >     at
> >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> orImpl.java:43)
> >     at java.lang.reflect.Method.invoke(Method.java:616)
> >     at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> > Caused by: java.io.IOException: Job terminated with anomalous status
> FAILED
> >     at org.apache.pig.PigServer.openIterator(PigServer.java:849)
> >     ... 12 more
> >
> >
> >
> ======================================================================
> ==========
> > --
> >
> >
> > What to do?
> > Can u help me to figure this out..
> >
> >
> >
> > Regards
> >
> > Manish Dunani
> > skype id : manish.dunani
> >
>



--
Regards

*Manish Dunani*
*Contact No* : +91 9408329137
*skype id* : manish.dunani*
*

Reply via email to