avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Lang <tobias.l...@evoscout.com>
Subject Avro Builder EnumSymbol casting error
Date Thu, 09 Oct 2014 14:18:38 GMT
Hi,

a problem arised with the Avro Builder in a MapReduce-program I am writing.

According to https://issues.apache.org/jira/browse/AVRO-1020 this issue
should have been fixed a while ago.

However, I get the following Exception (Hadoop 2.4.0, Avro 1.7.4):

-----------------------------------------
java.lang.Exception: org.apache.avro.AvroRuntimeException:
java.lang.ClassCastException:
org.apache.avro.generic.GenericData$EnumSymbol cannot be cast to
de.trevotrend.tt.ProductModuleIndicator
    at
org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462)
    at
org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:522)
Caused by: org.apache.avro.AvroRuntimeException:
java.lang.ClassCastException:
org.apache.avro.generic.GenericData$EnumSymbol cannot be cast to
de.trevotrend.tt.ProductModuleIndicator
    at
de.trevotrend.tt.TtBookingRequest$Builder.build(TtBookingRequest.java:2812)
    at
de.trevotrend.util.CsvInputParser.parseFieldsToAvroBookingRequest(CsvInputParser.java:83)
    at
de.trevotrend.util.CsvInputParser.lineToBookingRequest(CsvInputParser.java:420)
    at
de.trevotrend.mapreduce.TtToAvroConvertMapper.map(TtToAvroConvertMapper.java:54)
    at
de.trevotrend.mapreduce.TtToAvroConvertMapper.map(TtToAvroConvertMapper.java:31)
    at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:340)
    at
org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:243)
    at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException:
org.apache.avro.generic.GenericData$EnumSymbol cannot be cast to
de.trevotrend.tt.ProductModuleIndicator
    at
de.trevotrend.tt.TtBookingRequest$Builder.build(TtBookingRequest.java:2789)
    ... 13 more
-----------------------------------------

I am pretty sure, that only Avro 1.7.4 is in the Classpath. Anybody an
idea, what I am missing?

Thanks in advance,

Tobi


Mime
View raw message