You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Olga Natkovich (JIRA)" <ji...@apache.org> on 2011/03/04 17:46:37 UTC

[jira] Resolved: (PIG-1784) ERROR 1081: Cannot cast to map. Expected bytearray but received: bag

     [ https://issues.apache.org/jira/browse/PIG-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich resolved PIG-1784.
---------------------------------

    Resolution: Fixed

> ERROR 1081: Cannot cast to map. Expected bytearray but received: bag
> --------------------------------------------------------------------
>
>                 Key: PIG-1784
>                 URL: https://issues.apache.org/jira/browse/PIG-1784
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.8.0
>            Reporter: Vivek Padmanabhan
>            Assignee: Daniel Dai
>             Fix For: 0.8.0
>
>
> The below script was working fine with Pig 0.7. But in Pig 0.8 it is throwing exception.
> A = LOAD 'small_input' USING PigStorage(',') AS (spaceid);
> B = foreach A generate spaceid;
> X = load 'main_data/part-00149' using MapLoader() as (map1, map2, map3);
> X = LIMIT X 10;
> Raw = foreach X generate map1#'yuid' as type, flatten(map3#'timespent_sessions') as timespent;
> Mapping = join Raw by timespent#'p', B by spaceid USING 'replicated' parallel 50;
> store Mapping into 'out';
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Total 3 Mr jobs ar e planned for this script.The reducers of the second MR job is failing with the below exception :
> WARN org.apache.hadoop.mapred.Child: Error running child
> org.apache.pig.backend.executionengine.ExecException: ERROR 1081: Cannot cast to map. Expected bytearray but received: bag
> 	at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POCast.getNext(POCast.java:942)
> 	at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POMapLookUp.processInput(POMapLookUp.java:87)
> 	at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POMapLookUp.getNext(POMapLookUp.java:98)
> 	at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POMapLookUp.getNext(POMapLookUp.java:117)
> 	at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POLocalRearrange.getNext(POLocalRearrange.java:288)
> 	at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POFRJoin.getNext(POFRJoin.java:252)
> 	at org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.processInput(PhysicalOperator.java:276)
> 	at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:240)
> 	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce$Reduce.runPipeline(PigMapReduce.java:433)
> 	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce$Reduce.processOnePackageOutput(PigMapReduce.java:401)
> 	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce$Reduce.reduce(PigMapReduce.java:381)
> 	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce$Reduce.reduce(PigMapReduce.java:251)
> 	at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:176)
> 	at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:572)
> 	at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:414)
> 	at org.apache.hadoop.mapred.Child$4.run(Child.java:242)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at javax.security.auth.Subject.doAs(Subject.java:396)
> 	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1062)
> 	at org.apache.hadoop.mapred.Child.main(Child.java:236)
> Caused by: java.lang.ClassCastException: org.apache.pig.data.DefaultDataBag cannot be cast to org.apache.pig.data.DataByteArray
> 	at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POCast.getNext(POCast.java:928)

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira