vruc commented on issue #4721: Flink pulsar sink NotSerializableException URL: https://github.com/apache/pulsar/issues/4721#issuecomment-532742215 > > > I run into similar problem. > I follow the https://github.com/apache/pulsar/blob/master/examples/flink/src/main/java/org/apache/flink/streaming/connectors/pulsar/example/README.md and I execute the './bin/flink run -c org.apache.flink.streaming.connectors.pulsar.example.PulsarConsumerSourceWordCount ${PULSAR_HOME}/examples/flink/target/pulsar-flink-examples.jar --service-url pulsar://localhost:6650 --input-topic test_src --subscription test_sub' successfully. But when I add the parameter 'output-topic', it will throw exception. > Exception information followed: > > org.apache.pulsar.client.impl.DefaultBatcherBuilder@75d2da2d is not serializable. The object probably contains or references non serializable fields. > org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:151) > org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126) > org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126) > org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:71) org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.clean(StreamExecutionEnvironment.java:1574) > org.apache.flink.streaming.api.datastream.DataStream.clean(DataStream.java:185) > org.apache.flink.streaming.api.datastream.DataStream.addSink(DataStream.java:1227) > org.apache.flink.streaming.connectors.pulsar.example.PulsarConsumerSourceWordCount.main(PulsarConsumerSourceWordCount.java:98) > > the version: > flink 1.9.0 > pulsar 2.4.0 > java 1.8 You can use 2.3.2 or 2.5.0-SNAPSHOT have a try. DefaultBatcherBuilder in 2.4.1 didnot extends Serializable. This is hotfix commit: https://github.com/apache/pulsar/commit/6a67ae094b5ecfa1a4602b8f7baff9a838b44e23#diff-d4876cc56bcbd7b0fe549311203cd213
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services