Hong Liang Teoh created FLINK-36612:
---------------------------------------

             Summary: Flink TypeSerializer doesn't recognize valid POJO 
getters/setters generated by Lombok
                 Key: FLINK-36612
                 URL: https://issues.apache.org/jira/browse/FLINK-36612
             Project: Flink
          Issue Type: Bug
          Components: API / Type Serialization System
    Affects Versions: 2.0.0, 1.20.1
            Reporter: Hong Liang Teoh


When creating a POJO using Lombok, the getters and setters are automatically 
generated.

It would be good for Flink to recognise the generated getters and setters 
generated by Lombok.

 

 

 
h2. Steps to replicate

Create a class using Lombok
{code:java}
@Builder(toBuilder = true)
@Data
@AllArgsConstructor
@ToString
public class Telemetry {
    
    private String label;
    private String source;
    private boolean isDroppable;
    private List<String> values;
} {code}
Check the serializer used for the class
{code:java}
            var config = new ExecutionConfig();
            TypeSerializer<?> serializer = TypeExtractor.getForClass(clazz)
                    .createSerializer(config);
            System.out.println("Class: " + clazz + " Serializer: " + 
serializer);{code}
h2. References

Blogpost:w

[https://www.linkedin.com/pulse/eliminating-kryo-serialisation-apache-flink-120-remove-jason-taylor-qoase/]

Type extractor checks for method names:

[https://github.com/apache/flink/blob/cddb14eddcd607daa9f74c3e276d68a4e614c014/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java#L2034-L2036]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to