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.

【解决】

好,我接受他的建议

再次运行

数据正常!

相关推荐
feiyangqingyun2 小时前
Qt项目作品在苹果macos上编译运行效果/视频监控系统/物联网平台等
开发语言·qt·macos
东东2333 小时前
前端规范工具之husky与lint-staged
前端·javascript·eslint
你不是我我3 小时前
【Java 开发日记】我们来说一说 Redisson 的原理
java·开发语言
kk”3 小时前
C++ stack 和 queue
开发语言·c++
岁月宁静3 小时前
在 Vue 3.5 中优雅地集成 wangEditor,并定制“AI 工具”下拉菜单(总结/润色/翻译)
前端·javascript·vue.js
Matlab仿真实验室3 小时前
基于Matlab实现双目图计算深度图
开发语言·数码相机·matlab·双目图计算深度图
atwednesday3 小时前
日志处理
javascript
#做一个清醒的人3 小时前
【electron6】Web Audio + AudioWorklet PCM 实时采集噪音和模拟调试
前端·javascript·electron·pcm
QT 小鲜肉4 小时前
【数据结构与算法基础】05. 栈详解(C++ 实战)
开发语言·数据结构·c++·笔记·学习·算法·学习方法
拉不动的猪4 小时前
图文引用打包时的常见情景解析
前端·javascript·后端