pan3793 commented on code in PR #5518:
URL: https://github.com/apache/kyuubi/pull/5518#discussion_r1379570328
##########
externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/FlinkSQLEngine.scala:
##########
@@ -129,15 +128,21 @@ object FlinkSQLEngine extends Logging {
}
}
- private def bootstrapFlinkApplicationExecutor() = {
- // trigger an execution to initiate EmbeddedExecutor with the default
flink conf
+ private def bootstrap(executionTarget: String) = {
val flinkConf = new Configuration()
- flinkConf.set(PipelineOptions.NAME, "kyuubi-bootstrap-sql")
- debug(s"Running bootstrap Flink SQL in application mode with flink conf:
$flinkConf.")
val tableEnv = TableEnvironment.create(flinkConf)
- val res = tableEnv.executeSql("select 'kyuubi'")
- res.await()
- info("Bootstrap Flink SQL finished.")
+
+ if ("yarn-application".equalsIgnoreCase(executionTarget)) {
+ // trigger an execution to initiate EmbeddedExecutor with the default
flink conf
+ flinkConf.set(PipelineOptions.NAME, "kyuubi-bootstrap-sql")
+ debug(s"Running bootstrap Flink SQL in application mode with flink conf:
$flinkConf.")
+ tableEnv.executeSql("select 'kyuubi'").await()
+ }
+
+ kyuubiConf.get(ENGINE_INITIALIZE_SQL).foreach(
+ tableEnv.executeSql(_).await())
Review Comment:
```suggestion
kyuubiConf.get(ENGINE_INITIALIZE_SQL).foreach { stmt =>
tableEnv.executeSql(stmt).await()
}
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]