beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Przemyslaw Dubaniewicz (JIRA)" <j...@apache.org>
Subject [jira] [Created] (BEAM-4064) ClassCastExeption when reading Avro files using specific records with org.apache.avro.util.Utf8 fields
Date Fri, 13 Apr 2018 12:14:00 GMT
Przemyslaw Dubaniewicz created BEAM-4064:
--------------------------------------------

             Summary: ClassCastExeption when reading Avro files using specific records with
org.apache.avro.util.Utf8 fields
                 Key: BEAM-4064
                 URL: https://issues.apache.org/jira/browse/BEAM-4064
             Project: Beam
          Issue Type: Bug
          Components: io-java-avro
    Affects Versions: 2.4.0
            Reporter: Przemyslaw Dubaniewicz
            Assignee: Eugene Kirpichov


Reading Avro files using Avro-generated classes with org.apache.avro.util.Utf8 fields fails
with an exception:
{code:java}
Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to
org.apache.avro.util.Utf8
    at com.example.avro.AvroRecord.put(AvroRecord.java:129)
    at org.apache.avro.generic.GenericData.setField(GenericData.java:690)
    at org.apache.avro.reflect.ReflectData.setField(ReflectData.java:135)
    at org.apache.avro.reflect.ReflectData.setField(ReflectData.java:128)
    at org.apache.avro.specific.SpecificDatumReader.readField(SpecificDatumReader.java:119)
    at org.apache.avro.reflect.ReflectDatumReader.readField(ReflectDatumReader.java:310)
    at org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:222)
    at org.apache.avro.generic.GenericDatumReader.readWithoutConversion(GenericDatumReader.java:175)
    at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:153)
    at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:145)
    at org.apache.beam.sdk.io.AvroSource$AvroBlock.readNextRecord(AvroSource.java:577)
    at org.apache.beam.sdk.io.BlockBasedSource$BlockBasedReader.readNextRecord(BlockBasedSource.java:223)
    at org.apache.beam.sdk.io.FileBasedSource$FileBasedReader.advanceImpl(FileBasedSource.java:473)
    at org.apache.beam.sdk.io.FileBasedSource$FileBasedReader.startImpl(FileBasedSource.java:468)
    at org.apache.beam.sdk.io.OffsetBasedSource$OffsetBasedReader.start(OffsetBasedSource.java:261)
    at org.apache.beam.runners.direct.BoundedReadEvaluatorFactory$BoundedReadEvaluator.processElement(BoundedReadEvaluatorFactory.java:141)
    at org.apache.beam.runners.direct.DirectTransformExecutor.processElements(DirectTransformExecutor.java:161)
    at org.apache.beam.runners.direct.DirectTransformExecutor.run(DirectTransformExecutor.java:125)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
{code}
 

 

 

 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message