Reputation: 1
The following code works fine:
S4 = FOREACH S3 GENERATE group AS page_i,
COUNT(S2) AS outlinks,
FLATTEN(S2.rank);
DUMP S4
The result are like below:
(Computer engineering,1,0.1111111111111111)
(Outline of computer science,1,0.1111111111111111)
However, when I try to create one more table using divide:
S44 = FOREACH S4 GENERATE group as page_i, outlinks/2, ...
It goes gown like:
Failed Jobs:
JobId Alias Feature Message Outputs
job_local125575051_0033 S6,S66 DISTINCT Message: Job failed! Error - NA
file:/tmp/temp-847036156/tmp-1908150009,
Input(s):
Successfully read records from: "/home/song/workspace/FinalProject/output/part-m-00000"
Successfully read records from: "/home/song/workspace/FinalProject/output/part-m-00000"
Output(s):
Failed to produce result in "file:/tmp/temp-847036156/tmp-1908150009"
Job DAG:
job_local777342816_0028 -> job_local39708124_0029,
job_local39708124_0029 -> job_local495952123_0030,job_local268178801_0032,
job_local495952123_0030 -> job_local1880869927_0031,
job_local1880869927_0031 -> job_local268178801_0032,
job_local268178801_0032 -> job_local125575051_0033,
job_local125575051_0033
2015-04-29 07:45:49,133 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Some jobs have failed! Stop running all dependent jobs
2015-04-29 07:45:49,136 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1066: Unable to open iterator for alias S66
Details at logfile: /home/song/workspace/FinalProject/pig_1430315000370.log
Upvotes: 0
Views: 901
Reputation: 302
It seems that you are trying to project a field called group for each tuple in relation S4, while the schema contains only those fields:
So I guess that all you need to do is to replace the invalid line with:
S44 = FOREACH S4 GENERATE page_i as page_i, outlinks/2, ...
Or maybe just:
S44 = FOREACH S4 GENERATE page_i, outlinks/2, ...
Hope that this was the only issue here...
Upvotes: 1