From d541997954e7b28ffa9df5e4bcaea817c8aa8992 Mon Sep 17 00:00:00 2001 From: Zhanghao Chen Date: Sat, 14 Dec 2024 21:38:13 +0800 Subject: [PATCH] [FLINK-36904] Fix document error on how to programmatically configure serialization --- .../fault-tolerance/serialization/third_party_serializers.md | 4 ++-- .../fault-tolerance/serialization/types_serialization.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/content/docs/dev/datastream/fault-tolerance/serialization/third_party_serializers.md b/docs/content/docs/dev/datastream/fault-tolerance/serialization/third_party_serializers.md index 67fdc36c56375..fcd244aac26f9 100644 --- a/docs/content/docs/dev/datastream/fault-tolerance/serialization/third_party_serializers.md +++ b/docs/content/docs/dev/datastream/fault-tolerance/serialization/third_party_serializers.md @@ -45,8 +45,8 @@ You could also programmatically set it as follows: 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}]"); +config.set(PipelineOptions.SERIALIZATION_CONFIG, + List.of("org.example.MyCustomType: {type: kryo, kryo-type: registered, class: org.example.MyCustomSerializer}")); StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(config); ``` diff --git a/docs/content/docs/dev/datastream/fault-tolerance/serialization/types_serialization.md b/docs/content/docs/dev/datastream/fault-tolerance/serialization/types_serialization.md index 4b3dc6f76c23e..0d4441f4d3fbd 100644 --- a/docs/content/docs/dev/datastream/fault-tolerance/serialization/types_serialization.md +++ b/docs/content/docs/dev/datastream/fault-tolerance/serialization/types_serialization.md @@ -274,8 +274,8 @@ while block-style YAML list is used in the above example for better readability) ```java Configuration config = new Configuration(); config.set(PipelineOptions.SERIALIZATION_CONFIG, - "[org.example.MyCustomType1: {type: pojo, class: org.example.MyCustomSerializer1}," - + "org.example.MyCustomType2: {type: kryo, kryo-type: registered, class: org.example.MyCustomSerializer2}]"); + List.of("org.example.MyCustomType1: {type: pojo, class: org.example.MyCustomSerializer1}", + "org.example.MyCustomType2: {type: kryo, kryo-type: registered, class: org.example.MyCustomSerializer2}")); StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(config); ```