Flink中因java的泛型擦除导致的报错及解决

【报错】

java 复制代码
Exception in thread "main" org.apache.flink.api.common.functions.InvalidTypesException: The return type of function 'Custom Source' could not be determined automatically, due to type erasure. You can give type information hints by using the returns(...) method on the result of the transformation call, or by letting your function implement the 'ResultTypeQueryable' interface.

【解决】

好,我接受他的建议

再次运行

数据正常!

相关推荐
sharemylove18 分钟前
Java集合框架全面详解
java·开发语言·经验分享·笔记·学习
郝学胜-神的一滴5 小时前
Effective Python 条款43:自定义容器类
开发语言·windows·python·pandas·scikit-learn·pyqt
FYKJ_20105 小时前
springboot贫困生认定管理系统59009-计算机毕业设计、课程设计
java·javascript·vue.js·spring boot·后端·django·课程设计
kyriewen5 小时前
我测了 5 种关页上报,两种老写法一条都没发出去
前端·javascript·程序员
好焊孙辉6 小时前
一条产线省下 30 个电机位:Z 轴和 R 轴,该合成一个了
开发语言·r语言
布莱克6056 小时前
Swift 中的逃逸闭包与非逃逸闭包:@escaping 到底在做什么
开发语言·ios·swift·闭包·逃逸
郝学胜-神的一滴6 小时前
Effective STL 条款 14:用扩容函数避免重新分配
linux·开发语言·网络·数据结构·c++·单片机
吃我一窝jio7 小时前
Java IO流核心分类与应用
java·开发语言·笔记
Kari118 小时前
医药和制造行业的外文文档批量翻译,排版怎么保住?
开发语言·c#·制造
天若有情67310 小时前
开源|纯前端·条码&二维码在线生成器,支持拖拽缩放、复制生成码图片
前端·javascript·开源·html·二维码·条形码