avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Carey (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AVRO-790) Java: GenericDatumReader can fail when reusing objects with unions containing 'bytes' fields
Date Tue, 29 Mar 2011 22:29:05 GMT

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

Scott Carey updated AVRO-790:
-----------------------------

    Status: Patch Available  (was: Open)

> Java: GenericDatumReader can fail when reusing objects with unions containing 'bytes'
fields
> --------------------------------------------------------------------------------------------
>
>                 Key: AVRO-790
>                 URL: https://issues.apache.org/jira/browse/AVRO-790
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>            Reporter: Scott Carey
>            Assignee: Scott Carey
>             Fix For: 1.5.1
>
>         Attachments: AVRO-790.patch
>
>
> GenericDatumReader can fail when reusing GenericRecord objects that contain unions of
'bytes' and other types.  
> Enhanced unit tests in TestSchema.java uncovered this.
> Errors are of the form:
> {code}
> java.lang.ClassCastException: org.apache.avro.generic.GenericData$Array cannot be cast
to java.nio.ByteBuffer
> 	at org.apache.avro.generic.GenericDatumReader.readBytes(GenericDatumReader.java:333)
> 	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:145)
> 	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:142)
> 	at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:129)
> {code}

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

Mime
View raw message