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.

【解决】

好,我接受他的建议

再次运行

数据正常!

相关推荐
1024小神8 分钟前
tauri项目在windows上的c盘没有权限写入文件
c语言·开发语言·windows
KaneLogger10 分钟前
视频转文字,别再反复拖进度条了
前端·javascript·人工智能
老虎062716 分钟前
数据结构(Java)--位运算
java·开发语言·数据结构
yanjiaweiya16 分钟前
云原生-集群管理续
java·开发语言·云原生
Swift社区17 分钟前
Swift 解 LeetCode 320:一行单词有多少种缩写可能?用回溯找全解
开发语言·leetcode·swift
写不出来就跑路22 分钟前
暑期实习感悟与经验分享:从校园到职场的成长之路
java·开发语言·经验分享·spring boot
前端风云志23 分钟前
JavaScript中如何遍历对象?
javascript
weixin_472339466 小时前
高效处理大体积Excel文件的Java技术方案解析
java·开发语言·excel
枯萎穿心攻击6 小时前
响应式编程入门教程第二节:构建 ObservableProperty<T> — 封装 ReactiveProperty 的高级用法
开发语言·unity·c#·游戏引擎
Eiceblue8 小时前
【免费.NET方案】CSV到PDF与DataTable的快速转换
开发语言·pdf·c#·.net