osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Store Predicate or any lambda in MapState


Hey Jayant, 

I don't really think that the sole fact of using Predicate should cause the ClassNotFoundException that You are talking about. The exception may come from the fact that some libraries are missing from Your cluster environment. Have You tried running the job locally to verify that the exception occurs? Also, could You please paste some logs here, they may help in determining the exact reason for the problem.

Best Regards,
Dom.



śr., 21 lis 2018 o 04:41 Jayant Ameta <wittyameta@xxxxxxxxx> napisał(a):
Hi,
I want to store a custom POJO in the MapState. One of the fields in the object is a java.util.function.Predicate type. 
Flink gives ClassNotFoundException exception on the lambda. How do I store this object in the mapState?

Marking the predicate field as transient is an option. But in my use-case, the predicate field is set using another library, and I don't want to call it every time I want.


Jayant Ameta