当前位置: 首页 > 工具软件 > determined > 使用案例 >

【Flink】The return type of function ‘Custom Source‘ could not be determined automatically

姚新霁
2023-12-01

在定义Flink数据源的时候出现了下面的错误

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.
    at org.apache.flink.api.dag.Transformation.getOutputType(Transformation.java:479)
    at org.apache.flink.streaming.api.datastream.DataStream.addSink(DataStream.java:1236)
    at org.apache.flink.streaming.api.datastream.DataStream.print(DataStream.java:970)
    at com.demo.StateTest.main(StateTest.java:38)
Caused by: org.apache.flink.api.common.functions.InvalidTypesException: Type of TypeVariable 'OUT' in 'interface org.apach

 类似资料: