ververica平台| flink所需的上下文属性不匹配

xzv2uavs  于 2021-06-21  发布在  Flink
关注(0)|答案(1)|浏览(425)

我试图提交一个作业到ververica平台部署在kubernates,但我得到了以下消息,我提交相同的代码到flink单机版和正常工作!!我使用的是flink1.10.1和scala2.12的代码。

Caused by: org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: Could not find a suitable table factory for 'org.apache.flink.table.factories.TableSinkFactory' in
the classpath.

Reason: Required context properties mismatch.

The following properties are requested:

connector.driver=com.mysql.jdbc.Driver
connector.password=******
connector.table=*****
connector.type=jdbc
connector.url=jdbc:mysql://**********
connector.username=********
schema.0.data-type=VARCHAR(255) 
schema.0.name=**********
schema.1.data-type=BIGINT 
schema.1.name=****
schema.2.data-type=VARCHAR(255)
schema.2.name=*****
schema.3.data-type=DATE
schema.3.name=******
schema.4.data-type=BIGINT
schema.4.name=******
schema.5.data-type=VARCHAR(255)
schema.5.name=************
schema.6.data-type=DATE
schema.6.name=*********

The following factories have been considered:
org.apache.flink.table.sinks.CsvBatchTableSinkFactory
org.apache.flink.table.sinks.CsvAppendTableSinkFactory
        at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:335)
        at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:205)
        at org.apache.flink.client.program.OptimizerPlanEnvironment.getPipeline(OptimizerPlanEnvironment.java:80)
        at org.apache.flink.client.program.PackagedProgramUtils.getPipelineFromProgram(PackagedProgramUtils.java:108)
        at org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:58)
        at org.apache.flink.container.entrypoint.ClassPathJobGraphRetriever.retrieveJobGraph(ClassPathJobGraphRetriever.java:104)
        ... 9 more
Caused by: org.apache.flink.table.api.NoMatchingTableFactoryException: Could not find a suitable table factory for 'org.apache.flink.table.factories.TableSinkFactory' in
the classpath.
c9qzyr3d

c9qzyr3d1#

错误消息表明flink没有找到tablefactory来生成要写入mysql表的连接器。
您应该将jdbc表/sql连接器与程序jar捆绑在一起。

相关问题