flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Ewen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-6909) Flink should support Lombok POJO
Date Thu, 27 Jul 2017 12:27:00 GMT

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

Stephan Ewen commented on FLINK-6909:

I think Greg has a point here, but I also see that Lombok is starting to be used in a widespread
fashion. Would be nice to see if there is a way to support this without too much added complexity.

By the time the type is passed to the {{TypeExtractor}}, it should already be "delomboked"
in the sense that getters and setters are present in the class file. Is there possibly just
a simple mismatch in the "signature" checks for the methods to let them qualify as a POJO
or not?

In any case, the exception seems not the best way to report this incompatibility ;-)

[~twalthr] Do you have any thoughts on that?

> Flink should support Lombok POJO
> --------------------------------
>                 Key: FLINK-6909
>                 URL: https://issues.apache.org/jira/browse/FLINK-6909
>             Project: Flink
>          Issue Type: Wish
>          Components: Type Serialization System
>            Reporter: Md Kamaruzzaman
>            Priority: Minor
>             Fix For: 1.2.1
> Project lombok helps greatly to reduce boilerplate Java Code. 
> It seems that Flink does not accept a lombok POJO as a valid pojo. 
> e.g. Here is a POJO defined with lombok:
> @Getter
> @Setter
> @NoArgsConstructor
> public class SimplePojo
> Using this Pojo class to read from CSV file throws this exception:
> Exception in thread "main" java.lang.ClassCastException: org.apache.flink.api.java.typeutils.GenericTypeInfo
cannot be cast to org.apache.flink.api.java.typeutils.PojoTypeInfo
> It would be great if flink supports lombok POJO.

This message was sent by Atlassian JIRA

View raw message