You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/09/25 03:06:23 UTC
[GitHub] [flink] KurtYoung commented on a change in pull request #9761: [FLINK-14031][examples][table]Added the blink planner dependency and …
KurtYoung commented on a change in pull request #9761: [FLINK-14031][examples][table]Added the blink planner dependency and …
URL: https://github.com/apache/flink/pull/9761#discussion_r327914357
##########
File path: flink-examples/flink-examples-table/src/main/java/org/apache/flink/table/examples/java/StreamSQLExample.java
##########
@@ -42,9 +47,24 @@
public static void main(String[] args) throws Exception {
+ final ParameterTool params = ParameterTool.fromArgs(args);
+ String planner = params.has("planner") ? params.get("planner") : "flink";
+
// set up execution environment
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
- StreamTableEnvironment tEnv = StreamTableEnvironment.create(env);
+ StreamTableEnvironment tEnv;
+ if (Objects.equals(planner, "blink")) { // use blink planner in streaming mode
+ EnvironmentSettings settings = EnvironmentSettings.newInstance()
+ .useBlinkPlanner()
+ .inStreamingMode()
+ .build();
+ tEnv = StreamTableEnvironment.create(env, settings);
+ } else if (Objects.equals(planner, "flink")){ // use flink planner in streaming mode
Review comment:
nit: space before `{`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services