You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Robert Metzger (JIRA)" <ji...@apache.org> on 2014/06/22 14:36:25 UTC

[jira] [Commented] (FLINK-963) Using ArrayList as second generic Tuple parameter doesn't work

    [ https://issues.apache.org/jira/browse/FLINK-963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14040117#comment-14040117 ] 

Robert Metzger commented on FLINK-963:
--------------------------------------

Thank you for reporting the issue. We use the Avro serializer for serializing all types we don't have specialized serializers for.
Sadly, the Avro serializer does not support Collections. We are planning to move to Kryo as a general purpose serializer. Kryo supports Collections.
See also here: http://apache-flink-incubator-mailing-list-archive.1008284.n3.nabble.com/XML-data-types-td625.html

If you are interested in contributing to our project, you can take a look into the Kryo serializer and try to integrate it with our system.
Kryo: https://github.com/EsotericSoftware/kryo

> Using ArrayList as second generic Tuple parameter doesn't work
> --------------------------------------------------------------
>
>                 Key: FLINK-963
>                 URL: https://issues.apache.org/jira/browse/FLINK-963
>             Project: Flink
>          Issue Type: Bug
>    Affects Versions: pre-apache-0.5.1
>            Reporter: Bastian Köcher
>
> I want to have a class like this
> "class ClusterHistory extends Tuple2<Integer, ArrayList<Tuple2<Integer, Integer>>>". 
> I already had a case where this was working and I could use an ArrayList as a second generic parameter. 
> Now I'm getting the following error:
> eu.stratosphere.nephele.client.JobExecutionException: org.apache.avro.AvroRuntimeException: Can't find element type of Collection
> 	at org.apache.avro.reflect.ReflectData.createSchema(ReflectData.java:430)
> 	at org.apache.avro.specific.SpecificData.getSchema(SpecificData.java:188)
> 	at org.apache.avro.reflect.ReflectDatumReader.<init>(ReflectDatumReader.java:46)
> 	at eu.stratosphere.api.java.typeutils.runtime.AvroSerializer.checkAvroInitialized(AvroSerializer.java:132)
> 	at eu.stratosphere.api.java.typeutils.runtime.AvroSerializer.serialize(AvroSerializer.java:102)
> 	at eu.stratosphere.api.java.typeutils.runtime.TupleSerializer.serialize(TupleSerializer.java:104)
> 	at eu.stratosphere.api.java.typeutils.runtime.TupleSerializer.serialize(TupleSerializer.java:26)
> 	at eu.stratosphere.pact.runtime.plugable.SerializationDelegate.write(SerializationDelegate.java:51)
> 	at eu.stratosphere.runtime.io.serialization.SpanningRecordSerializer.addRecord(SpanningRecordSerializer.java:70)
> 	at eu.stratosphere.runtime.io.api.RecordWriter.emit(RecordWriter.java:92)
> 	at eu.stratosphere.pact.runtime.shipping.OutputCollector.collect(OutputCollector.java:82)
> 	at eu.stratosphere.pact.runtime.task.DataSourceTask.invoke(DataSourceTask.java:209)
> 	at eu.stratosphere.nephele.execution.RuntimeEnvironment.run(RuntimeEnvironment.java:284)
> 	at java.lang.Thread.run(Thread.java:745)
> 	at eu.stratosphere.nephele.client.JobClient.submitJobAndWait(JobClient.java:354)
> 	at eu.stratosphere.client.LocalExecutor.executePlan(LocalExecutor.java:222)
> 	at eu.stratosphere.api.java.LocalEnvironment.execute(LocalEnvironment.java:55)
> 	at eu.stratosphere.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:516)



--
This message was sent by Atlassian JIRA
(v6.2#6252)