I have the following scenario for understanding my problem.
- There is one external node (Node A), one client App (App1) and one Hazelcast-Jet Job App (Node B, App2).
- App1 collects data from FlatBuffers and wraps it in an Object HzData. HzData is DataSerializable implemented.
- Then HzData is put in an IMAP as IMAP calling it hzMap.
- First, I start my Node A, and then App1. App1 deposits hzMap in Node A.
- Then, I run App2, which starts in turn starts node B and runs the Jet Job.
- Little bit information about App2, I have the same HzData in App2 under the same package name.I am adding all the classes related to the job in JobConfig.
- And then my pipeline consists something similar to this code.
BatchSource<Map.Entry<Integer, HzData>> dataBatchSource = Sources.map('hzMap');
BatchStage<HzData> dataBatchStage = pipe.drawFrom(dataBatchSource ).
mapUsingContext(ContextFactories.replicatedMapContext
('hzMap'),
(map, data) -> data.getValue());
dataBatchStage.drainTo(Sinks.logger())
The above quote works perfectly fine logging all the data. If I am using a filter like below, it is causing me problems
dataBatchStage.filter(v -> v.getCheck() == 0).drainTo(Sinks.logger());
The above is causing me an error like,
com.hazelcast.jet.JetException: Exception in ProcessorTasklet{filter#24}: java.lang.ClassCastException: com.nexus.api.portables.HzData cannot be cast to com.nexus.api.portables.HzData
The error seems like a Deserialization error, but I wonder how the above logger worked.
I have also tried using filterUsingContext()
but still got the same result.
Thanks in advance. Looking forward for your valuable feedback and solutions.