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.

【解决】

好,我接受他的建议

再次运行

数据正常!

相关推荐
Irissgwe13 小时前
C++ STL关联式容器详解:set、multiset、map、multimap
开发语言·c++·stl·set·map·multiset·关联式容器
叶帆14 小时前
【YFIOs】用C#开发硬件之WiFi网络
开发语言·网络·c#
meilindehuzi_a14 小时前
深入理解 JavaScript 的同步与异步机制:从单线程设计到 Promise 核心应用
开发语言·javascript·ecmascript
如烟花的信页14 小时前
加速乐cookie逆向分析
javascript·爬虫·python·js逆向
永远的WEB小白14 小时前
css改变svg图标的颜色
前端·javascript·css
ikoala14 小时前
Codex 不得不装的 12 个插件,都在这了
前端·javascript·后端
skywalk816314 小时前
记录段言的开发过程
开发语言·学习·编程
未若君雅裁14 小时前
JVM 垃圾回收器全景与G1深度解析
java·开发语言·jvm
霸道流氓气质14 小时前
Java 大数据量异步处理方案:线程池 vs 消息队列
java·开发语言
devilnumber14 小时前
想真正吃透 + 灵活运用 Java 代理模式
java·开发语言·代理模式