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.

【解决】

好,我接受他的建议

再次运行

数据正常!

相关推荐
烟雨江南aabb19 小时前
Python第六弹:python爬虫篇:什么是爬虫
开发语言·爬虫·python
沐知全栈开发19 小时前
Servlet 文件上传详解
开发语言
一只小小Java20 小时前
Echarts单表多图实现
前端·javascript·echarts
跟着珅聪学java20 小时前
Element UI 的 Tabs 标签页开发教程
javascript·vue.js·elementui
竹林81820 小时前
用Viem替换ethers.js:一次合约交互的"减负"实战,我总算把TypeScript类型搞明白了
前端·javascript
basketball61620 小时前
C++ iostream 完全指南:从 cin/cout 到流式编程的奥秘
开发语言·c++
SilentSamsara20 小时前
运算符重载:让自定义对象支持 +、[]、in 操作
开发语言·python·算法·青少年编程·pycharm
threelab20 小时前
Three.js 3D 热力图效果 | 三维可视化 / AI 提示词
开发语言·前端·javascript·人工智能·3d·着色器
Royzst20 小时前
图书管理案例
java·开发语言
Hello--_--World20 小时前
利用CDN进行首屏优化。能不能看CDN与本地服务器谁快用谁?
运维·服务器·前端·javascript·vite