Hi Jean-Marc,

Thanks for reporting this, this is a mistake. Your code is correct, I've 
created a issue [1] to fix that.

[1] https://issues.apache.org/jira/browse/FLINK-36904

Best,
Zhanghao Chen
________________________________
From: Jean-Marc Paulin <jm.pau...@gmail.com>
Sent: Thursday, December 5, 2024 21:35
To: user@flink.apache.org <user@flink.apache.org>
Subject: How to programatically register a 3rd party serializer (Flink 1.20)

I am trying to use 3rd party serializers as per 
https://nightlies.apache.org/flink/flink-docs-release-1.20/docs/dev/datastream/fault-tolerance/serialization/third_party_serializers/

but the code sample does not compile
```
Configuration config = new Configuration();
// register the class of the serializer as serializer for a type
config.set(PipelineOptions.SERIALIZATION_CONFIG,
    "[org.example.MyCustomType: {type: kryo, kryo-type: registered, class: 
org.example.MyCustomSerializer}]");
```
because the expected parameter is a list of strings. I can do

```
config.set(PipelineOptions.SERIALIZATION_CONFIG, List.of(
    "org.example.MyCustomType: {type: kryo, kryo-type: registered, class: 
org.example.MyCustomSerializer}"));
```

But is it correct? I am concerned about the "[ ]" that denotes a collection in 
yaml/json.

Thanks

JM

Reply via email to