You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jingsong Lee (Jira)" <ji...@apache.org> on 2020/01/09 02:53:00 UTC

[jira] [Comment Edited] (FLINK-14875) Blink planner should pass the right ExecutionConfig to the creation of serializer

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

Jingsong Lee edited comment on FLINK-14875 at 1/9/20 2:52 AM:
--------------------------------------------------------------

How much effort needed for passing the right ExecutionConfig to the creation of serializer? A clean fix should be huge. I don't think we can fix it in 1.10. And we have not exposed ExecutionConfig api to new TableEnvironment. (Only worked in StreamTableEnv)

One solution is using user define TypeInfo: [https://ci.apache.org/projects/flink/flink-docs-master/dev/types_serialization.html#defining-type-information-using-a-factory]


was (Author: lzljs3620320):
How much effort needed for passing the right ExecutionConfig to the creation of serializer? A clean fix should be huge. I don't think we can fix it in 1.10. And we have not exposed ExecutionConfig api to new TableEnvironment. (Only worked in StreamTableEnv)

One solution is using user define TypeInfo: [https://ci.apache.org/projects/flink/flink-docs-master/dev/types_serialization.html#defining-type-information-using-a-factory]

 

> Blink planner should pass the right ExecutionConfig to the creation of serializer
> ---------------------------------------------------------------------------------
>
>                 Key: FLINK-14875
>                 URL: https://issues.apache.org/jira/browse/FLINK-14875
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>            Reporter: Jing Zhang
>            Priority: Major
>             Fix For: 1.11.0
>
>         Attachments: ImmutableCollectionKryoDeserializerITCase.java
>
>
> If source contains data which has immutable collection, the exception will be thrown out:
> {code:java}
> Caused by: com.esotericsoftware.kryo.KryoException: java.lang.UnsupportedOperationException
> Serialization trace:
> logTags_ (com.aliyun.openservices.log.common.Logs$LogGroup)
> mLogGroup (com.aliyun.openservices.log.common.LogGroupData)
> 	at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:125)
> 	at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:528)
> 	at com.esotericsoftware.kryo.Kryo.readObjectOrNull(Kryo.java:730)
> 	at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:113)
> 	at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:528)
> 	at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:761)
> 	at org.apache.flink.api.java.typeutils.runtime.kryo.KryoSerializer.deserialize(KryoSerializer.java:315)
> 	at org.apache.flink.api.common.typeutils.base.ListSerializer.deserialize(ListSerializer.java:138)
> 	at org.apache.flink.api.common.typeutils.base.ListSerializer.deserialize(ListSerializer.java:47)
> 	at org.apache.flink.util.InstantiationUtil.deserializeFromByteArray(InstantiationUtil.java:463)
> 	at org.apache.flink.table.dataformat.BinaryRow.getGeneric(BinaryRow.java:440)
> 	at BaseRowSerializerProjection$52.apply(Unknown Source)
> 	at BaseRowSerializerProjection$52.apply(Unknown Source)
> 	at org.apache.flink.table.typeutils.BaseRowSerializer.baseRowToBinary(BaseRowSerializer.java:250)
> 	at org.apache.flink.table.typeutils.BaseRowSerializer.serializeToPages(BaseRowSerializer.java:285)
> 	at org.apache.flink.table.typeutils.BaseRowSerializer.serializeToPages(BaseRowSerializer.java:55)
> 	at org.apache.flink.table.runtime.sort.BinaryInMemorySortBuffer.write(BinaryInMemorySortBuffer.java:190)
> 	at org.apache.flink.table.runtime.sort.BinaryExternalSorter.write(BinaryExternalSorter.java:540)
> 	... 10 more
> Caused by: java.lang.UnsupportedOperationException
> 	at java.util.Collections$UnmodifiableCollection.add(Collections.java:1055)
> 	at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:109)
> 	at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:22)
> 	at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:679)
> 	at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:106)
> 	... 27 more
> {code}
> the exception could also appears in a simple ITCase in attachments.
> I find similar problems in [How to set Unmodifiable collection serializer of Kryo in Spark code|https://stackoverflow.com/questions/46818293/how-to-set-unmodifiable-collection-serializer-of-kryo-in-spark-code], is there any way to set unmodifiable collection serializer of Kryo in at present? 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)