我正在尝试使用不从 kinesis flink 应用程序中的外部库实现 Serializable 的 pojo。在 flatMap 函数中使用它时序列化失败。
波乔
public class ExecutionRecord {
private Map<String, VariableGroup> factMap;
private List<ModelResult> models;
private List<RulesetResult> rulesets;
private Outcome outcome;
private ExecutionMetadata executionMetadata;
}
的输出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>]>
错误-
java.io.NotSerializableException: ExecutionRecord
堆栈跟踪也没有显示它无法序列化的特定字段。
我应该如何注册序列化程序java.util.list
以及java.util.map
哪些被识别为泛型类型以及其余的自定义 pojo