Grokbase Groups Pig dev January 2011
FAQ
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


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.
-
You can reply to this email to add a comment to the issue online.

Search Discussions

  • Olga Natkovich (JIRA) at Jan 5, 2011 at 8:42 pm
    [ https://issues.apache.org/jira/browse/PIG-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Olga Natkovich reassigned PIG-1784:
    -----------------------------------

    Assignee: Daniel Dai
    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

    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.
    -
    You can reply to this email to add a comment to the issue online.
  • Olga Natkovich (JIRA) at Mar 3, 2011 at 1:08 am
    [ https://issues.apache.org/jira/browse/PIG-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Olga Natkovich updated PIG-1784:
    --------------------------------

    Fix Version/s: 0.8.0
    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
  • Olga Natkovich (JIRA) at Mar 4, 2011 at 4:46 pm
    [ 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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriespig, hadoop
postedJan 4, '11 at 12:42p
activeMar 4, '11 at 4:46p
posts4
users1
websitepig.apache.org

1 user in discussion

Olga Natkovich (JIRA): 4 posts

People

Translate

site design / logo © 2022 Grokbase