You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/01/24 10:55:44 UTC

[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1827: [KYUUBI #1825] Generate appName for Flink applications

yaooqinn commented on a change in pull request #1827:
URL: https://github.com/apache/incubator-kyuubi/pull/1827#discussion_r790625295



##########
File path: externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/FlinkSQLEngine.scala
##########
@@ -72,6 +75,20 @@ object FlinkSQLEngine extends Logging {
     try {
       val flinkConfDir = CliFrontend.getConfigurationDirectoryFromEnv
       val flinkConf = GlobalConfiguration.loadConfiguration(flinkConfDir)
+
+      val executionTarget = flinkConf.getString(DeploymentOptions.TARGET)
+      // set cluster name for per-job and application mode
+      executionTarget match {
+        case "yarn-per-job" | "yarn-application" =>
+          val appName = s"kyuubi_${user}_flink_${Instant.now}"
+          flinkConf.setString("yarn.application.name", appName)

Review comment:
       Does it need to be `set if unset`?




-- 
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: commits-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org