[ 
https://issues.apache.org/jira/browse/FLINK-36904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhanghao Chen updated FLINK-36904:
----------------------------------
    Description: 
>From user email: 
>https://lists.apache.org/thread/mdokv42k0zxlxdwl7y61hv2pc3fjwmyq
 
??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/]??
|??[3rd Party Serializers \\| Apache 
Flink\|https://nightlies.apache.org/flink/flink-docs-release-1.20/docs/dev/datastream/fault-tolerance/serialization/third_party_serializers/]??
??3rd Party Serializers # If you use a custom type in your Flink program which 
cannot be serialized by the Flink type serializer, Flink falls back to using 
the generic Kryo serializer. You may register your own serializer or a 
serialization system like Google Protobuf or Apache Thrift with Kryo. To do 
that, simply register the type class and the serializer via the configuration 
option pipeline ...??
??nightlies.apache.org??|

 
??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}"));??
??```??

  was:
>From user email:
 
??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/]??
|??[3rd Party Serializers \| Apache 
Flink|https://nightlies.apache.org/flink/flink-docs-release-1.20/docs/dev/datastream/fault-tolerance/serialization/third_party_serializers/]??
??3rd Party Serializers # If you use a custom type in your Flink program which 
cannot be serialized by the Flink type serializer, Flink falls back to using 
the generic Kryo serializer. You may register your own serializer or a 
serialization system like Google Protobuf or Apache Thrift with Kryo. To do 
that, simply register the type class and the serializer via the configuration 
option pipeline ...??
??nightlies.apache.org??|
 
??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}"));??
??```??


> Fix doc error on how to programmatically register a 3rd-party serializer
> ------------------------------------------------------------------------
>
>                 Key: FLINK-36904
>                 URL: https://issues.apache.org/jira/browse/FLINK-36904
>             Project: Flink
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0, 1.20.0
>            Reporter: Zhanghao Chen
>            Priority: Major
>
> From user email: 
> https://lists.apache.org/thread/mdokv42k0zxlxdwl7y61hv2pc3fjwmyq
>  
> ??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/]??
> |??[3rd Party Serializers \\| Apache 
> Flink\|https://nightlies.apache.org/flink/flink-docs-release-1.20/docs/dev/datastream/fault-tolerance/serialization/third_party_serializers/]??
> ??3rd Party Serializers # If you use a custom type in your Flink program 
> which cannot be serialized by the Flink type serializer, Flink falls back to 
> using the generic Kryo serializer. You may register your own serializer or a 
> serialization system like Google Protobuf or Apache Thrift with Kryo. To do 
> that, simply register the type class and the serializer via the configuration 
> option pipeline ...??
> ??nightlies.apache.org??|
>  
> ??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}"));??
> ??```??



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

Reply via email to