flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paris Carbone <par...@kth.se>
Subject Stringable Hashmap keys on POJOs
Date Thu, 04 Dec 2014 18:13:13 GMT
Hello,

It seems that Avro fails to serialise POJOs that contain non-String or stringable keys<https://apache.googlesource.com/avro/+/40650540dcb8ca8a6b6235de5cdd36c0f6e2eb31/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectData.java#361>.
eg. in the example here<https://github.com/senorcarbone/incubator-flink/blob/72b6798b50396c962fc6cea20a2bcdd51eec06f4/flink-examples/flink-java-examples/src/main/java/org/apache/flink/examples/java/testing/LongMapKeyIssueExample.java>
I get a compiler exception caused by:

org.apache.avro.AvroTypeException: Map key class not String: class java.lang.Long

Is there any known workaround/recommendation for this except for using String keys?
I need this for a use case of low latency data-intensive streaming so String conversions should
be avoided.

Paris



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message