Skip to content

Commit

Permalink
[FLINK-36904] Fix document error on how to programmatically configure…
Browse files Browse the repository at this point in the history
… serialization
  • Loading branch information
X-czh authored and reswqa committed Dec 16, 2024
1 parent 8aeb2ff commit d541997
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
```

Expand Down

0 comments on commit d541997

Please sign in to comment.