yaooqinn commented on a change in pull request #32610:
URL: https://github.com/apache/spark/pull/32610#discussion_r649659243



##########
File path: 
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientUtils.scala
##########
@@ -29,13 +29,16 @@ import io.fabric8.kubernetes.api.model.{ConfigMap, 
ConfigMapBuilder, KeyToPath}
 
 import org.apache.spark.SparkConf
 import org.apache.spark.deploy.k8s.{Config, Constants, KubernetesUtils}
+import org.apache.spark.deploy.k8s.Config.KUBERNETES_LABEL_MAX_LENGTH
 import org.apache.spark.deploy.k8s.Constants.ENV_SPARK_CONF_DIR
 import org.apache.spark.internal.Logging
 
 private[spark] object KubernetesClientUtils extends Logging {
 
   // Config map name can be 63 chars at max.
-  def configMapName(prefix: String): String = s"${prefix.take(54)}-conf-map"
+  def configMapName(prefix: String, suffix: String = "-conf-map"): String = {

Review comment:
       OK, I will revert this part

##########
File path: 
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientUtils.scala
##########
@@ -29,13 +29,16 @@ import io.fabric8.kubernetes.api.model.{ConfigMap, 
ConfigMapBuilder, KeyToPath}
 
 import org.apache.spark.SparkConf
 import org.apache.spark.deploy.k8s.{Config, Constants, KubernetesUtils}
+import org.apache.spark.deploy.k8s.Config.KUBERNETES_LABEL_MAX_LENGTH
 import org.apache.spark.deploy.k8s.Constants.ENV_SPARK_CONF_DIR
 import org.apache.spark.internal.Logging
 
 private[spark] object KubernetesClientUtils extends Logging {
 
   // Config map name can be 63 chars at max.
-  def configMapName(prefix: String): String = s"${prefix.take(54)}-conf-map"
+  def configMapName(prefix: String, suffix: String = "-conf-map"): String = {

Review comment:
       The `suffix` is different across Spark codebase actually, but the same 
for the callers of this method currently ... We may need another PR to reflect 
other places to call the method here for the consistency 
    of config map names
   




-- 
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to