I am trying to use a pojo which does not implement Serializable from an external library in the kinesis flink application .The serialization is failing while using it inside flatMap function.
Pojo
public class ExecutionRecord {
private Map<String, VariableGroup> factMap;
private List<ModelResult> models;
private List<RulesetResult> rulesets;
private Outcome outcome;
private ExecutionMetadata executionMetadata;
}
Output of TypeInformation.of(ExecutionRecord.class).toString()
PojoType<ExecutionRecord, fields = [executionMetadata: PojoType<ExecutionMetadata, fields = [endTime: String, evaluationType: String, executionHost: String, executionId: String, gmraInstanceIDs: GenericType<java.util.List>, startTime: String]>, factMap: GenericType<java.util.Map>, models: GenericType<java.util.List>, outcome: PojoType<Outcome, fields = [actions: GenericType<java.util.List>, failedActions: GenericType<java.util.List>, outcomeName: String]>, rulesets: GenericType<java.util.List>]>
Error-
java.io.NotSerializableException: ExecutionRecord
The stack trace is also not showing which specific field it is not able to serialize.
How shall I register the serializer for java.util.list
and java.util.map
which are recognised as generic types and for rest of custom pojos