Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
wForget committed Apr 30, 2024
1 parent 17df084 commit feca972
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ object KyuubiApplicationManager {

private def setupFlinkYarnTag(tag: String, conf: KyuubiConf): Unit = {
val originalTag = conf
.getOption(s"${FlinkProcessBuilder.FLINK}.${FlinkProcessBuilder.YARN_TAG_KEY}")
.getOption(s"${FlinkProcessBuilder.FLINK_CONF_PREFIX}.${FlinkProcessBuilder.YARN_TAG_KEY}")
.orElse(conf.getOption(FlinkProcessBuilder.YARN_TAG_KEY))
.map(_ + ",").getOrElse("")
val newTag = s"${originalTag}KYUUBI" + Some(tag).filterNot(_.isEmpty).map("," + _).getOrElse("")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class FlinkProcessBuilder(
val flinkHome: String = getEngineHome(shortName)

val flinkExecutable: String = {
Paths.get(flinkHome, "bin", FLINK).toFile.getCanonicalPath
Paths.get(flinkHome, "bin", FLINK_EXEC_FILE).toFile.getCanonicalPath
}

// flink.execution.target are required in Kyuubi conf currently
Expand Down Expand Up @@ -115,7 +115,7 @@ class FlinkProcessBuilder(
flinkExtraJars += s"$hiveConfFile"
}

val customFlinkConf = conf.getAllWithPrefix(FLINK, "")
val customFlinkConf = conf.getAllWithPrefix(FLINK_CONF_PREFIX, "")
// add custom yarn.ship-files
flinkExtraJars ++= customFlinkConf.get(YARN_SHIP_FILES_KEY)
val yarnAppName = customFlinkConf.get(YARN_APPLICATION_NAME_KEY)
Expand All @@ -131,10 +131,9 @@ class FlinkProcessBuilder(
buffer += "-Dcontainerized.master.env.HIVE_CONF_DIR=."
}

customFlinkConf.filter {
c =>
!Seq("app.name", YARN_SHIP_FILES_KEY, YARN_APPLICATION_NAME_KEY, YARN_TAG_KEY).contains(
c._1)
customFlinkConf.filter { case (k, _) =>
!Seq("app.name", YARN_SHIP_FILES_KEY, YARN_APPLICATION_NAME_KEY, YARN_TAG_KEY)
.contains(k)
}.foreach { case (k, v) =>
buffer += s"-D$k=$v"
}
Expand Down Expand Up @@ -220,7 +219,8 @@ class FlinkProcessBuilder(
}

object FlinkProcessBuilder {
final val FLINK = "flink"
final val FLINK_EXEC_FILE = "flink"
final val FLINK_CONF_PREFIX = "flink"
final val APP_KEY = "flink.app.name"
final val YARN_TAG_KEY = "yarn.tags"
final val YARN_SHIP_FILES_KEY = "yarn.ship-files"
Expand Down

0 comments on commit feca972

Please sign in to comment.