You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Vivek Padmanabhan (Created) (JIRA)" <ji...@apache.org> on 2012/02/23 13:31:49 UTC
[jira] [Created] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
----------------------------------------------------------------------------------------------------
Key: PIG-2550
URL: https://issues.apache.org/jira/browse/PIG-2550
Project: Pig
Issue Type: Bug
Affects Versions: 0.9.1, 0.8.1, 0.10
Reporter: Vivek Padmanabhan
In the below script ;
{code}
a = load 'gen_data/' AS (f1,f2);
b = load 'gen_data_02/' AS (f1,f2);
c = cogroup a by f1,b by f1;
d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
store d into 'test006';
{code}
The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
The script execution fails at the reducer side with the below exception while reading back the spilled data,
2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
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:1082)
at org.apache.hadoop.mapred.Child.main(Child.java:249)
It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
but while reading back we always use BinSedesTuple.
--
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
[jira] [Commented] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Amol Kekre (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13237300#comment-13237300 ]
Amol Kekre commented on PIG-2550:
---------------------------------
Daniel, Thejas,
Can this patch be committed. We are looking to launch it on grids asap.
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Attachments: PIG-2550-1.patch, REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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
[jira] [Commented] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Daniel Dai (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220649#comment-13220649 ]
Daniel Dai commented on PIG-2550:
---------------------------------
I was able to reproduce now. The problem is we spill data using custom tuple's serializer, but when we read it back, we use BinInterSedes. I try to make a fix tomorrow.
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Attachments: REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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
[jira] [Commented] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Vivek Padmanabhan (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218083#comment-13218083 ]
Vivek Padmanabhan commented on PIG-2550:
----------------------------------------
For the error to happen DefaultDataBag should be spilling data on reduce side. This test was run on MR mode.
gen_data is same as asgen_data_02 but with a smaller value.
{code}
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class Gen {
public static void main(String[] args) throws IOException {
BufferedWriter bw = new BufferedWriter( new FileWriter( new File ("tmp_data")));
StringBuffer sb = new StringBuffer ();
for(int i=0;i < 200; i ++)
sb.append(i);
bw.write(sb.toString());
bw.write("\t");
for(int i=0;i < 5*1000 ; i ++)
bw.write(""+i%10);
bw.close();
}
}
{code}
BTW I tried to set pig.data.tuple.factory.name to org.apache.pig.data.DefaultTupleFactory but the property is not picked up in the map/reduce tasks.
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Attachments: REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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
[jira] [Resolved] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Daniel Dai (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Dai resolved PIG-2550.
-----------------------------
Resolution: Fixed
Hadoop Flags: Reviewed
Committed to 0.9/0.10/trunk. For trunk, it is actually fixed in PIG-2359. Only commit the test case to trunk.
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Assignee: Daniel Dai
> Fix For: 0.10, 0.9.3, 0.11
>
> Attachments: PIG-2550-1.patch, REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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
[jira] [Commented] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Vivek Padmanabhan (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222260#comment-13222260 ]
Vivek Padmanabhan commented on PIG-2550:
----------------------------------------
Thanks Daniel, the script goes through fine with the patch
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Attachments: PIG-2550-1.patch, REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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
[jira] [Commented] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Dmitriy V. Ryaboy (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222478#comment-13222478 ]
Dmitriy V. Ryaboy commented on PIG-2550:
----------------------------------------
That only fixes the spilling behavior. It does not fix the fact that custom tuples whose serialization does not match BinInterSedes can't be used across the Map-Reduce boundary.
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Attachments: PIG-2550-1.patch, REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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
[jira] [Commented] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Amol Kekre (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220549#comment-13220549 ]
Amol Kekre commented on PIG-2550:
---------------------------------
Any updates on when we can get a fix?
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Attachments: REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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
[jira] [Commented] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Daniel Dai (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217418#comment-13217418 ]
Daniel Dai commented on PIG-2550:
---------------------------------
I follow your instructions but not able to reproduce it. In step 2, you mention how gen_data_02 is generated, but how gen_data is generated? Is that reproducible in local mode?
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Attachments: REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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
[jira] [Commented] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Daniel Dai (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222502#comment-13222502 ]
Daniel Dai commented on PIG-2550:
---------------------------------
That's true. After serialization/deserialization, you will get BinSedesTuple instead of custom tuple.
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Attachments: PIG-2550-1.patch, REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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
[jira] [Updated] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Daniel Dai (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Dai updated PIG-2550:
----------------------------
Attachment: PIG-2550-1.patch
Vivek, can you try the patch?
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Attachments: PIG-2550-1.patch, REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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
[jira] [Updated] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Vivek Padmanabhan (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vivek Padmanabhan updated PIG-2550:
-----------------------------------
Attachment: REPRODUCING_SPILL_ERROR.txt
Attaching the artifacts used to reproduce this issue.
-Dmapred.reduce.child.java.opts="-Xmx512M"
It looks like this job runs fine with Pig 0.7
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Attachments: REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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
[jira] [Updated] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Daniel Dai (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Dai updated PIG-2550:
----------------------------
Fix Version/s: 0.11
0.9.3
0.10
Assignee: Daniel Dai
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Assignee: Daniel Dai
> Fix For: 0.10, 0.9.3, 0.11
>
> Attachments: PIG-2550-1.patch, REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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
[jira] [Commented] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Vivek Padmanabhan (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13214831#comment-13214831 ]
Vivek Padmanabhan commented on PIG-2550:
----------------------------------------
I got the script running after overriding read and write methods in the custom tuple
{code}
public class MyCustomTuple extends DefaultTuple {
private static final long serialVersionUID = 8156382697467819543L;
private static final InterSedes sedes = InterSedesFactory.getInterSedesInstance();
public MyCustomTuple() {
super();
}
public MyCustomTuple(Object t) {
super();
append(t);
}
public void write(DataOutput out) throws IOException {
sedes.writeDatum(out, this);
}
public void readFields(DataInput in) throws IOException {
// Clear our fields, in case we're being reused.
mFields.clear();
sedes.addColsToTuple(in, this);
}
}
{code}
I am not sure whether overriding write() will have any other impacts. Could this be considered as a workaround ?
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Attachments: REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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
[jira] [Commented] (PIG-2550) Custom tuple results in "Unexpected
datatype 110 while reading tuplefrom binary file" while spilling
Posted by "Thejas M Nair (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230741#comment-13230741 ]
Thejas M Nair commented on PIG-2550:
------------------------------------
bq. That only fixes the spilling behavior. It does not fix the fact that custom tuples whose serialization does not match BinInterSedes can't be used across the Map-Reduce boundary.
Yes, the tuples will be serialized using the BinInterSedes format at the map-reduce boundary, and BinInterTuples will be created after the boundary. I don't see a bug there.
+1 for the patch.
> Custom tuple results in "Unexpected datatype 110 while reading tuplefrom binary file" while spilling
> ----------------------------------------------------------------------------------------------------
>
> Key: PIG-2550
> URL: https://issues.apache.org/jira/browse/PIG-2550
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.1, 0.9.1, 0.10
> Reporter: Vivek Padmanabhan
> Attachments: PIG-2550-1.patch, REPRODUCING_SPILL_ERROR.txt
>
>
> In the below script ;
> {code}
> a = load 'gen_data/' AS (f1,f2);
> b = load 'gen_data_02/' AS (f1,f2);
> c = cogroup a by f1,b by f1;
> d = foreach c generate group,flatten(a),COUNT(b),flatten(UDFReturningMyCustomTuple(b,a));
> store d into 'test006';
> {code}
> The udf (UDFReturningMyCustomTuple) returns a bag which contains custom tuples.
> The script execution fails at the reducer side with the below exception while reading back the spilled data,
> 2012-02-23 10:37:16,840 FATAL org.apache.pig.data.DefaultDataBag: Unable to read our spill file.
> org.apache.pig.backend.executionengine.ExecException: ERROR 2112: Unexpected datatype 110 while reading tuple from binary file.
> at org.apache.pig.data.BinInterSedes.getTupleSize(BinInterSedes.java:133)
> at org.apache.pig.data.BinInterSedes.addColsToTuple(BinInterSedes.java:556)
> at org.apache.pig.data.BinSedesTuple.readFields(BinSedesTuple.java:66)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.next(DefaultDataBag.java:215)
> at org.apache.pig.data.DefaultDataBag$DefaultDataBagIterator.hasNext(DefaultDataBag.java:158)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:301)
> at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:208)
> 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.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:649)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
> at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
> 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:1082)
> at org.apache.hadoop.mapred.Child.main(Child.java:249)
> It looks like while spilling we do MyCustomTuple.write(DataOutput out) which writes the type as DataType.TUPLE (110),
> but while reading back we always use BinSedesTuple.
--
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