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 分钟前
C#与倍福TwinCAT3进行ADS通信
开发语言·c#
励志不掉头发的内向程序员29 分钟前
STL库——二叉搜索树
开发语言·c++·学习
至此流年莫相忘43 分钟前
设计模式:模板方法模式
java·开发语言·设计模式
土了个豆子的1 小时前
02.继承MonoBehaviour的单例模式基类
开发语言·visualstudio·单例模式·c#·里氏替换原则
qq_172805591 小时前
Go 自建库的使用教程与测试
开发语言·后端·golang
久绊A2 小时前
Hydra-SSH 破解安全防范
开发语言·php
阿昭L2 小时前
c++中获取随机数
开发语言·c++
3壹2 小时前
数据结构精讲:栈与队列实战指南
c语言·开发语言·数据结构·c++·算法
悟乙己2 小时前
使用 Python 中的强化学习最大化简单 RAG 性能
开发语言·python·agent·rag·n8n
max5006002 小时前
图像处理:实现多图点重叠效果
开发语言·图像处理·人工智能·python·深度学习·音视频