[ https://issues.apache.org/jira/browse/PIG-2306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114979#comment-13114979 ]
Doug Daniels commented on PIG-2306: ----------------------------------- I just discovered that the syntax I used has "group.x" for a one-item group key, when it should actually be just "group". Changing it to "group" makes the tests pass. I'm still getting this Exception with a more complicated script; I'll try to whittle it down to a minimal test case. > Exception from ILLUSTRATE on COGROUP / FOREACH > ---------------------------------------------- > > Key: PIG-2306 > URL: https://issues.apache.org/jira/browse/PIG-2306 > Project: Pig > Issue Type: Bug > Affects Versions: 0.9.0 > Reporter: Doug Daniels > Attachments: PIG-2306-test_cases.patch > > > I'm getting a ClassCastException trying to use ILLUSTRATE on a COGROUP > followed by a FOREACH. I've added two test cases to TestExampleGenerator > that produce the Exception (see attached patch). I also added two small > changes to PigServer to bubble the Exception upward inside the error log > message. > > The Exception is: > {code} > Exception : org.apache.pig.data.DataByteArray cannot be cast to > org.apache.pig.data.Tuple > java.io.IOException: Exception : org.apache.pig.data.DataByteArray cannot be > cast to org.apache.pig.data.Tuple > at org.apache.pig.PigServer.getExamples(PigServer.java:1207) > at > org.apache.pig.test.TestExampleGenerator.testCogroupWithForEachFlatten(TestExampleGenerator.java:271) > Caused by: java.lang.ClassCastException: org.apache.pig.data.DataByteArray > cannot be cast to org.apache.pig.data.Tuple > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject.getNext(POProject.java:462) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.processInput(PhysicalOperator.java:290) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject.getNext(POProject.java:158) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject.getNext(POProject.java:340) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:320) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:332) > at > org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:284) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.runPipeline(PigGenericMapReduce.java:459) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.processOnePackageOutput(PigGenericMapReduce.java:427) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.reduce(PigGenericMapReduce.java:407) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.reduce(PigGenericMapReduce.java:261) > at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:176) > at > org.apache.pig.pen.LocalMapReduceSimulator.launchPig(LocalMapReduceSimulator.java:222) > at > org.apache.pig.pen.ExampleGenerator.getData(ExampleGenerator.java:257) > at > org.apache.pig.pen.ExampleGenerator.getData(ExampleGenerator.java:238) > at > org.apache.pig.pen.LineageTrimmingVisitor.init(LineageTrimmingVisitor.java:103) > at > org.apache.pig.pen.LineageTrimmingVisitor.<init>(LineageTrimmingVisitor.java:98) > at > org.apache.pig.pen.ExampleGenerator.getExamples(ExampleGenerator.java:166) > at org.apache.pig.PigServer.getExamples(PigServer.java:1201) > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira