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.

【解决】

好,我接受他的建议

再次运行

数据正常!

相关推荐
大模型铲屎官20 分钟前
【Python-Day 14】玩转Python字典(上篇):从零开始学习创建、访问与操作
开发语言·人工智能·pytorch·python·深度学习·大模型·字典
yunvwugua__23 分钟前
Python训练营打卡 Day27
开发语言·python
Java致死1 小时前
设计模式Java
java·开发语言·设计模式
zh_xuan1 小时前
c++ 类的语法3
开发语言·c++
weifont4 小时前
聊一聊Electron中Chromium多进程架构
javascript·架构·electron
大得3694 小时前
electron结合vue,直接访问静态文件如何跳转访问路径
javascript·vue.js·electron
belldeep5 小时前
如何阅读、学习 Tcc (Tiny C Compiler) 源代码?如何解析 Tcc 源代码?
c语言·开发语言
LuckyTHP5 小时前
java 使用zxing生成条形码(可自定义文字位置、边框样式)
java·开发语言·python
it_remember6 小时前
新建一个reactnative 0.72.0的项目
javascript·react native·react.js
敲代码的小吉米8 小时前
前端上传el-upload、原生input本地文件pdf格式(纯前端预览本地文件不走后端接口)
前端·javascript·pdf·状态模式