Skip to content

Commit 7832480

Browse files
committed
[SPARK-25887][K8S] Simplify logging statement
1 parent 5e4c340 commit 7832480

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/SparkKubernetesClientFactory.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ private[spark] object SparkKubernetesClientFactory extends Logging {
6969
// Allow for specifying a context used to auto-configure from the users K8S config file
7070
val kubeContext = sparkConf.get(KUBERNETES_CONTEXT).filter(_.nonEmpty)
7171
logInfo(s"Auto-configuring K8S client using " +
72-
s"${if (kubeContext.isDefined) s"context ${kubeContext.getOrElse("?")}"
73-
else "current context"}" +
72+
kubeContext.map("context " + _).getOrElse("current context") +
7473
s" from users K8S config file")
7574

7675
// Start from an auto-configured config with the desired context

0 commit comments

Comments
 (0)