Github user mccheah commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20910#discussion_r177273537
  
    --- Diff: 
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientApplication.scala
 ---
    @@ -180,20 +167,17 @@ private[spark] class Client(
       }
     
       // Build a Config Map that will house spark conf properties in a single 
file for spark-submit
    -  private def buildConfigMap(configMapName: String, conf: SparkConf): 
ConfigMap = {
    +  private def buildConfigMap(configMapName: String, conf: Map[String, 
String]): ConfigMap = {
         val properties = new Properties()
    -    conf.getAll.foreach { case (k, v) =>
    +    conf.foreach { case (k, v) =>
           properties.setProperty(k, v)
         }
         val propertiesWriter = new StringWriter()
         properties.store(propertiesWriter,
           s"Java properties built from Kubernetes config map with name: 
$configMapName")
    -
    -    val namespace = conf.get(KUBERNETES_NAMESPACE)
         new ConfigMapBuilder()
           .withNewMetadata()
             .withName(configMapName)
    -        .withNamespace(namespace)
    --- End diff --
    
    It's not necessary to set namespaces on these objects because the 
kubernetes client itself is namespaced.


---

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

Reply via email to