You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/09/21 01:51:01 UTC
[GitHub] [incubator-kyuubi] zwangsheng commented on a diff in pull request #3527: [SPARK] Kyuubi should set env SPARK_USER_NAME for K8s deployment
zwangsheng commented on code in PR #3527:
URL: https://github.com/apache/incubator-kyuubi/pull/3527#discussion_r975962884
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala:
##########
@@ -91,10 +91,22 @@ class SparkProcessBuilder(
buffer += s"${convertConfigKey(k)}=$v"
}
- // iff the keytab is specified, PROXY_USER is not supported
- if (!useKeytab()) {
- buffer += PROXY_USER
- buffer += proxyUser
+ // For spark on kubernetes, spark pod using env SPARK_USER_NAME as current user
+ def setSparkUserName(userName: String): Unit = {
+ buffer += CONF
+ buffer += s"spark.kubernetes.driverEnv.SPARK_USER_NAME=$userName"
+ buffer += CONF
+ buffer += s"spark.kubernetes.executorEnv.SPARK_USER_NAME=$userName"
Review Comment:
Nice, i'm gonna change it
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org