flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gyula Fora (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-12141) Allow @TypeInfo annotation on POJO field declarations
Date Tue, 09 Apr 2019 09:13:00 GMT

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

Gyula Fora commented on FLINK-12141:

This is somewhat related to [FLINK-4783|https://issues.apache.org/jira/browse/FLINK-4783]
which would solve the external type question. But even with that sometimes you want to register
custom serialization for certain types in certain usages (maybe because setting a global serializer
for a type would break an existing job).

> Allow @TypeInfo annotation on POJO field declarations
> -----------------------------------------------------
>                 Key: FLINK-12141
>                 URL: https://issues.apache.org/jira/browse/FLINK-12141
>             Project: Flink
>          Issue Type: New Feature
>          Components: API / Type Serialization System
>            Reporter: Gyula Fora
>            Priority: Minor
>              Labels: starter
> The TypeInfo annotation is a great way to declare serializers for custom types however
I feel that it's usage is limited by the fact that it can only be used on types that are declared
in the project.
> By allowing the annotation to be used on field declarations we could improve the TypeExtractor
logic to use the type factory when creating the PojoTypeInformation.
> This would be a big improvement as in many cases classes from other libraries or collection
types are used within custom Pojo classes and Flink would default to Kryo serialization which
would hurt performance and cause problems later.
> The current workaround in these cases is to implement a custom serializer for the entire
pojo which is a waste of effort when only a few fields might require custom serialization

This message was sent by Atlassian JIRA

View raw message