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.

【解决】

好,我接受他的建议

再次运行

数据正常!

相关推荐
zxctsclrjjjcph12 分钟前
【C语言】常见的C语言概念
c语言·开发语言
小灰灰爱代码17 分钟前
C++——求3个数中最大的数(分别考虑整数、双精度数、长整数的情况),用函数模板来实现。
开发语言·c++·算法
Eiceblue24 分钟前
Python 复制Excel 中的行、列、单元格
开发语言·python·excel
项目題供诗28 分钟前
尚品汇-秒杀商品存入缓存、Redis发布订阅实现状态位(五十一)
开发语言·php
好名字082129 分钟前
monorepo基础搭建教程(从0到1 pnpm+monorepo+vue)
前端·javascript
m0_7145902636 分钟前
汇编(实现C语言程序的调用)
c语言·开发语言·汇编
Flying_Fish_roe37 分钟前
浏览器的内存回收机制&监控内存泄漏
java·前端·ecmascript·es6
做技术的Pandaer39 分钟前
Go 第二期
开发语言·golang
新知图书40 分钟前
Rust编程的作用域与所有权
开发语言·后端·rust
c#上位机1 小时前
C#事件的用法
java·javascript·c#