You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by eriendeng <er...@tencent.com> on 2021/03/10 14:17:42 UTC

提交两个SQL任务,其中一个不生效。

大家好,我通过Yarn Per
Job模式提交了两个任务,后一个提交的任务会变成前一个一样的任务,而且好像不产生实际作用(?),看起来像是在给前一个做HA,不知道是不是什么配置没搞好呢?
两个任务分别是 Kafka Topic1 -> Kafka Topic2 和 Kafka Topic2 ->
Postgre,两个任务中的Topic2用的是同一个。
之前也尝试过,Topic1同时写入Topic2和Postgre,好像也同样不会生效,这是为什么呢?
谢谢大家。



--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: 提交两个SQL任务,其中一个不生效。

Posted by HunterXHunter <13...@qq.com>.
StatementSet inserts = tableEnv.createStatementSet();
inserts.addInsertSql("insert into xxx select * from xxx") // topic1
-》topic2任务
inserts.addInsertSql("insert into xxx select * from xxx") // topic2
-》Postgre 任务
inserts.execute();



--
Sent from: http://apache-flink.147419.n8.nabble.com/