赞
踩
我的Flink pipeline 当前使用的是一个Pojo,它包含一些列表和 map(字符串),如下所示
public class MyPojo {
private List myList = new ArrayList<>();
private OtherPojo otherPojo = new OtherPojo();
// getters + setters...
}
public class OtherPojo {
private Map myMap = new HashMap<>();
// getters + setters...
}
出于性能原因,我想绕过Kryo序列化,因此我使用环境设置配置().disableGenericTypes();如Flink文档中所述。
现在, Flink抱怨这些名单:
Exception in thread "main" java.lang.UnsupportedOperationException: Generic types have been disabled in the ExecutionConfig and type java.util.List is treated as a generic type.
at org.apache.flink.api.java.typeutils.GenericTypeInfo.createSerializer(GenericTypeInfo.java:86)
at org.apache.flink.api.java.typeutils.PojoTypeInfo.createPojoSerializer(PojoTypeInfo.java:319)</
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。