pan3793 commented on code in PR #5168:
URL: https://github.com/apache/kyuubi/pull/5168#discussion_r1294940715
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala:
##########
@@ -208,6 +209,34 @@ class SparkProcessBuilder(
kubernetesNamespace())
}
+ def appendPodNameConf(conf: Map[String, String]): Map[String, String] = {
+ var result = Map[String, String]()
+ if (clusterManager().exists(cm =>
cm.toLowerCase(Locale.ROOT).startsWith("k8s"))) {
+ result = result ++ appendExecutorPodPrefix(conf)
+ if (deployMode().exists(_.toLowerCase(Locale.ROOT) == "cluster")) {
+ result = result ++ appendDriverPodPrefix(conf)
+ }
+ }
+ result
+ }
+
+ def appendDriverPodPrefix(conf: Map[String, String]): Map[String, String] = {
+ conf.get(KUBERNETES_DRIVER_POD_NAME) match {
+ // spark app name always be set
+ case None => Map(KUBERNETES_DRIVER_POD_NAME ->
+ KubernetesUtils.generateDriverPodName(conf(APP_KEY), engineRefId))
+ case _ => Map()
Review Comment:
`Map.empty` should be used to avoid creating unnecessary instance
--
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]