栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

Flink中常见的几种异常

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Flink中常见的几种异常

问题一:
Exception in thread “main” org.apache.flink.table.api.TableException: Could not instantiate the executor. Make sure a planner module is on the classpath
at org.apache.flink.table.api.java.internal.StreamTableEnvironmentImpl.lookupExecutor(StreamTableEnvironmentImpl.java:147)
at org.apache.flink.table.api.java.internal.StreamTableEnvironmentImpl.create(StreamTableEnvironmentImpl.java:116)
at org.apache.flink.table.api.java.StreamTableEnvironment.create(StreamTableEnvironment.java:112)
at com.cn.flink.function.MyStreamingSource$StreamingDemo.main(MyStreamingSource.java:185)
Caused by: org.apache.flink.table.api.NoMatchingTableFactoryException: Could not find a suitable table factory for ‘org.apache.flink.table.delegation.ExecutorFactory’ in

Exception in thread "main" org.apache.flink.table.api.TableException: Could not instantiate the executor. Make sure a planner module is on the classpath
	at org.apache.flink.table.api.java.internal.StreamTableEnvironmentImpl.lookupExecutor(StreamTableEnvironmentImpl.java:147)
	at org.apache.flink.table.api.java.internal.StreamTableEnvironmentImpl.create(StreamTableEnvironmentImpl.java:116)
	at org.apache.flink.table.api.java.StreamTableEnvironment.create(StreamTableEnvironment.java:112)
	at com.cn.flink.function.MyStreamingSource$StreamingDemo.main(MyStreamingSource.java:185)
Caused by: org.apache.flink.table.api.NoMatchingTableFactoryException: Could not find a suitable table factory for 'org.apache.flink.table.delegation.ExecutorFactory' in

解决方案
缺少pom文件

        
            org.apache.flink
            flink-table-planner-blink_${scala.binary.version}
            ${flink.version}
        

在此运行解决

问题二
Field types of query result and registered TableSink do not match.
返回结果时使用对象时类型与返回结果不对应
解决方案
先查看表结构

Table queryTable = bsTableEnv.sqlQuery ("select a.id,a.name,b.id,b.name from evenTable as a join oddTable as b on a.name = b.name");
            queryTable.printSchema ();

在创建对应的样例类

返回即可

解决
问题三Too many fields referenced from an atomic type.

由于手敲前面忘了加public公共的
解决方案

已解决

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/310559.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号