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.

【解决】

好,我接受他的建议

再次运行

数据正常!

相关推荐
swipe3 分钟前
JavaScript 对象操作进阶:从属性描述符到对象创建模式
前端·javascript·面试
篮l球场10 分钟前
Trie(字典树/前缀树)
开发语言·c#
似水明俊德16 分钟前
15-C#
android·开发语言·c#
hua8722238 分钟前
Golang 构建学习
java·开发语言·学习
2301_8035545239 分钟前
qt信号槽机制以及底层实现原理
开发语言·qt
大傻^39 分钟前
LangChain4j RAG 核心:Document、Embedding 与向量存储抽象
开发语言·人工智能·python·embedding·langchain4j
笨笨马甲40 分钟前
Qt 音视频编解码
开发语言·qt
Halo_tjn44 分钟前
Java 三个修饰符 相关知识点
java·开发语言
2401_883035461 小时前
C++20概念(Concepts)入门指南
开发语言·c++·算法
番茄去哪了1 小时前
Java基础面试题day01
java·开发语言·后端·javase·八股·面向对象编程