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.

【解决】

好,我接受他的建议

再次运行

数据正常!

相关推荐
Aotman_1 小时前
JS 按照数组顺序对对象进行排序
开发语言·前端·javascript·vue.js·ui·ecmascript
方璧8 小时前
限流的算法
java·开发语言
Hi_kenyon8 小时前
VUE3套用组件库快速开发(以Element Plus为例)二
开发语言·前端·javascript·vue.js
曲莫终8 小时前
Java VarHandle全面详解:从入门到精通
java·开发语言
ghie90909 小时前
基于MATLAB GUI的伏安法测电阻实现方案
开发语言·matlab·电阻
Gao_xu_sheng9 小时前
Inno Setup(专业安装/更新 EXE)
开发语言
EndingCoder9 小时前
Any、Unknown 和 Void:特殊类型的用法
前端·javascript·typescript
吴声子夜歌10 小时前
Java数据结构与算法——基本数学问题
java·开发语言·windows
JosieBook10 小时前
【Vue】09 Vue技术——JavaScript 数据代理的实现与应用
前端·javascript·vue.js