You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@crunch.apache.org by "Micah Whitacre (JIRA)" <ji...@apache.org> on 2014/03/12 22:16:44 UTC
[jira] [Updated] (CRUNCH-363) Cogroup using Protobufs with
WritableTypeFamily throws Proto Exception
[ https://issues.apache.org/jira/browse/CRUNCH-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Micah Whitacre updated CRUNCH-363:
----------------------------------
Attachment: CRUNCH-363-test.patch
This patch adds 4 Integration tests to crunch-core which test out using protobufs in various forms of the Cogroup. Only one test fails and that is a simple Cogroup of two PTables where the values are Protobufs and using WritableTypeFamily. If the values are Pairs or AvroTypeFamily the tests pass.
> Cogroup using Protobufs with WritableTypeFamily throws Proto Exception
> ----------------------------------------------------------------------
>
> Key: CRUNCH-363
> URL: https://issues.apache.org/jira/browse/CRUNCH-363
> Project: Crunch
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.8.2
> Reporter: Micah Whitacre
> Assignee: Josh Wills
> Attachments: CRUNCH-363-test.patch
>
>
> If you have code like the following:
> {code}
> PTable<String, Proto> t1 = ...
> PTable<String, Proto> t2 = ...
> ti.cogroup(t2);
> {code}
> Where the PType of each table was created using:
> ptf.tableOf(ptf.strings(), PTypes.protos(Person.class, ptf));
> and "ptf" is an instance of WritableTypeFamily.
> You will get an exception like the following.
> {quote}
> org.apache.crunch.CrunchRuntimeException: com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
> at org.apache.crunch.types.PTypes$ProtoInputMapFn.map(PTypes.java:191)
> at org.apache.crunch.types.PTypes$ProtoInputMapFn.map(PTypes.java:160)
> at org.apache.crunch.fn.CompositeMapFn.map(CompositeMapFn.java:63)
> at org.apache.crunch.types.writable.Writables$UWInputFn.map(Writables.java:611)
> at org.apache.crunch.types.writable.Writables$UWInputFn.map(Writables.java:573)
> at org.apache.crunch.types.PGroupedTableType$HoldLastIterator.next(PGroupedTableType.java:84)
> at org.apache.crunch.lib.Cogroup$PostGroupFn.map(Cogroup.java:275)
> at org.apache.crunch.lib.Cogroup$PostGroupFn.map(Cogroup.java:250)
> at org.apache.crunch.fn.PairMapFn.map(PairMapFn.java:62)
> at org.apache.crunch.fn.PairMapFn.map(PairMapFn.java:26)
> at org.apache.crunch.MapFn.process(MapFn.java:34)
> at org.apache.crunch.impl.mr.run.RTNode.process(RTNode.java:98)
> at org.apache.crunch.impl.mr.emit.IntermediateEmitter.emit(IntermediateEmitter.java:56)
> at org.apache.crunch.MapFn.process(MapFn.java:34)
> at org.apache.crunch.impl.mr.run.RTNode.process(RTNode.java:98)
> at org.apache.crunch.impl.mr.run.RTNode.processIterable(RTNode.java:113)
> at org.apache.crunch.impl.mr.run.CrunchReducer.reduce(CrunchReducer.java:57)
> at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:176)
> at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:650)
> at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:418)
> at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:262)
> Caused by: com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
> at com.google.protobuf.InvalidProtocolBufferException.invalidTag(InvalidProtocolBufferException.java:89)
> at com.google.protobuf.CodedInputStream.readTag(CodedInputStream.java:108)
> at org.apache.crunch.lib.PersonProtos$Person.<init>(PersonProtos.java:101)
> at org.apache.crunch.lib.PersonProtos$Person.<init>(PersonProtos.java:65)
> at org.apache.crunch.lib.PersonProtos$Person$1.parsePartialFrom(PersonProtos.java:153)
> at org.apache.crunch.lib.PersonProtos$Person$1.parsePartialFrom(PersonProtos.java:148)
> at org.apache.crunch.lib.PersonProtos$Person$Builder.mergeFrom(PersonProtos.java:484)
> at org.apache.crunch.lib.PersonProtos$Person$Builder.mergeFrom(PersonProtos.java:369)
> at com.google.protobuf.AbstractMessageLite$Builder.mergeFrom(AbstractMessageLite.java:196)
> at com.google.protobuf.AbstractMessage$Builder.mergeFrom(AbstractMessage.java:898)
> at com.google.protobuf.AbstractMessage$Builder.mergeFrom(AbstractMessage.java:267)
> at org.apache.crunch.types.PTypes$ProtoInputMapFn.map(PTypes.java:189)
> ... 20 more
> {quote}
> Note you don't get the same exception for AvroTypeFamily.
--
This message was sent by Atlassian JIRA
(v6.2#6252)