Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Hi all,
I’m new to Apache Flink and I have the following issue: I would like to enrich data via map function. For that I call a method which calls an endpoint but I get following error message „The implementation of the MapFunction is not serializable. The object probably contains or references non serializable fields. at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:99)“ … „Caused by: java.io.NotSerializableException: com.aylien.textapi.TextAPIClient“ Is there a smart way to fix that issue? Regards, Steffen Map Function: DataStream<TweetSentiment> tweetSentimentDataStream = noRTDataStream Class: public class SentimentAnalysis implements Serializable { (Analysis via Aylien) |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Hi Steffen,
You could make the class `TextAPIClient` serializable, or use `RichMapFunction` [1] and instantiate all the required objects in its `open()` method. Best, Xingcan
... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Hi Xingcan,
option two RichMapFunction works , thanks a lot! Thanks, Steffen
... [show rest of quote] |
Free forum by Nabble | Edit this page |