Also be aware about updating version of library (its jar).
If you rebuild code containing lambda, it can change its class name.
Upon recover, Kryo might read state with the old class name and cannot find it
any more then.
I would rather save something which is easily (de)serialisable in state
Hi
It can be just some dependency problem if this library, where the lambda is
defined, is not on the class path of the job.
On the other hand, we might want to investigate it because Flink uses some
older version 2.24.0 of kryo.
According to this issue [1], lambda support was added to Kryo
Any further help on this?
Jayant Ameta
On Wed, Nov 21, 2018 at 4:37 PM Jayant Ameta wrote:
> Here are the error logs.
>
> First error log was encountered when getting the values from the MapState.
>
> java.lang.ClassNotFoundException:
> com.test.MatcherFactory$$Lambda$879.1452224137
>
Here are the error logs.
First error log was encountered when getting the values from the MapState.
java.lang.ClassNotFoundException: com.test.MatcherFactory$$Lambda$879.1452224137
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at
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
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