You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Dan Hill (Jira)" <ji...@apache.org> on 2021/03/30 05:45:00 UTC
[jira] [Updated] (AVRO-3099) ProtobufDataWriter fails when enum
value is UNRECOGNIZED
[ https://issues.apache.org/jira/browse/AVRO-3099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Hill updated AVRO-3099:
---------------------------
Description:
This happens when the Java job with the protobuf writer has an older version of the protobuf class but receives protobuf data containing new, unrecognized enum values. When I print out the enum's toString, it returns 'UNRECOGNIZED'.
2021-03-29 22:01:33
org.apache.avro.file.DataFileWriter$AppendWriteException: java.lang.NullPointerException: null of com.example.proto.event.ActionType in field action_type of com.example.proto.event.Action of union in field action of com.example.proto.event.FlatEvent
at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:317)
...
Caused by: java.lang.NullPointerException: null of com.example.proto.event.ActionType in field action_type of com.example.proto.event.Action of union in field action of com.example.proto.event.Record
at org.apache.avro.generic.GenericDatumWriter.npe(GenericDatumWriter.java:184)
at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:178)
at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:83)
at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:73)
at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:314)
... 35 more
Caused by: java.lang.NullPointerException
was:
This happens when the Java job with the protobuf writer has an older version of the protobuf class but receives protobuf data containing new, unrecognized enum values. When I print out the enum's toString, it returns 'UNRECOGNIZED'.
2021-03-29 22:01:33
org.apache.avro.file.DataFileWriter$AppendWriteException: java.lang.NullPointerException: null of ai.promoted.proto.event.ActionType in field action_type of ai.promoted.proto.event.Action of union in field action of ai.promoted.proto.event.FlatEvent
at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:317)
...
Caused by: java.lang.NullPointerException: null of com.example.proto.event.ActionType in field action_type of com.example.proto.event.Action of union in field action of com.example.proto.event.Record
at org.apache.avro.generic.GenericDatumWriter.npe(GenericDatumWriter.java:184)
at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:178)
at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:83)
at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:73)
at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:314)
... 35 more
Caused by: java.lang.NullPointerException
> ProtobufDataWriter fails when enum value is UNRECOGNIZED
> --------------------------------------------------------
>
> Key: AVRO-3099
> URL: https://issues.apache.org/jira/browse/AVRO-3099
> Project: Apache Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.10.1
> Reporter: Dan Hill
> Priority: Major
>
> This happens when the Java job with the protobuf writer has an older version of the protobuf class but receives protobuf data containing new, unrecognized enum values. When I print out the enum's toString, it returns 'UNRECOGNIZED'.
> 2021-03-29 22:01:33
> org.apache.avro.file.DataFileWriter$AppendWriteException: java.lang.NullPointerException: null of com.example.proto.event.ActionType in field action_type of com.example.proto.event.Action of union in field action of com.example.proto.event.FlatEvent
> at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:317)
> ...
> Caused by: java.lang.NullPointerException: null of com.example.proto.event.ActionType in field action_type of com.example.proto.event.Action of union in field action of com.example.proto.event.Record
> at org.apache.avro.generic.GenericDatumWriter.npe(GenericDatumWriter.java:184)
> at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:178)
> at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:83)
> at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:73)
> at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:314)
> ... 35 more
> Caused by: java.lang.NullPointerException
--
This message was sent by Atlassian Jira
(v8.3.4#803005)