You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by vanzin <gi...@git.apache.org> on 2018/12/03 21:17:59 UTC

[GitHub] spark pull request #22904: [SPARK-25887][K8S] Configurable K8S context suppo...

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

    https://github.com/apache/spark/pull/22904#discussion_r238439850
  
    --- Diff: resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/SparkKubernetesClientFactory.scala ---
    @@ -67,8 +66,16 @@ private[spark] object SparkKubernetesClientFactory {
         val dispatcher = new Dispatcher(
           ThreadUtils.newDaemonCachedThreadPool("kubernetes-dispatcher"))
     
    -    // TODO [SPARK-25887] Create builder in a way that respects configurable context
    -    val config = new ConfigBuilder()
    +    // Allow for specifying a context used to auto-configure from the users K8S config file
    +    val kubeContext = sparkConf.get(KUBERNETES_CONTEXT).filter(c => StringUtils.isNotBlank(c))
    --- End diff --
    
    Either `.filter { c => ... }` or `.filter(StringUtils.isNotBlank)`. But really you can skip the extra dependency (`.filter(_.nonEmpty)`).


---

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