You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/08/11 03:25:22 UTC
[GitHub] [spark] dongjoon-hyun commented on a change in pull request #33550: [SPARK-36321][K8S] Do not fail application in kubernetes if name is too long
dongjoon-hyun commented on a change in pull request #33550:
URL: https://github.com/apache/spark/pull/33550#discussion_r686463471
##########
File path: resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/KubernetesClusterManager.scala
##########
@@ -70,8 +70,16 @@ private[spark] class KubernetesClusterManager extends ExternalClusterManager wit
// If/when feature steps are executed in client mode, they should instead take care of this,
// and this code should be removed.
if (!sc.conf.contains(KUBERNETES_EXECUTOR_POD_NAME_PREFIX)) {
- sc.conf.set(KUBERNETES_EXECUTOR_POD_NAME_PREFIX,
- KubernetesConf.getResourceNamePrefix(sc.conf.get("spark.app.name")))
+ val podNamePrefix = KubernetesConf.getResourceNamePrefix(sc.conf.get("spark.app.name"))
+ if (KubernetesUtils.isValidExecutorPodNamePrefix(podNamePrefix)) {
+ sc.conf.set(KUBERNETES_EXECUTOR_POD_NAME_PREFIX, podNamePrefix)
+ } else {
+ val shortPrefix = "spark-" + KubernetesUtils.uniqueID()
Review comment:
+1 for the idea.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org