dongjoon-hyun commented on a change in pull request #32830:
URL: https://github.com/apache/spark/pull/32830#discussion_r648011555



##########
File path: 
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocatorSuite.scala
##########
@@ -647,6 +647,19 @@ class ExecutorPodsAllocatorSuite extends SparkFunSuite 
with BeforeAndAfter {
     verify(persistentVolumeClaims, never()).create(any())
   }
 
+  test("SPARK-32975: Avoid None.get when KUBERNETES_DRIVER_POD_NAME is option 
for client mode") {
+    val msg = "None.get"
+    val logAppender = new LogAppender(msg)
+    withLogAppender(logAppender) {
+      val conf = new SparkConf(false)

Review comment:
       `new SparkConf()` is enough. No need to give `false`.
   ```scala
   scala> new 
org.apache.spark.SparkConf().get("spark.kubernetes.driver.pod.name")
   java.util.NoSuchElementException: spark.kubernetes.driver.pod.name
     at org.apache.spark.SparkConf.$anonfun$get$1(SparkConf.scala:245)
     at scala.Option.getOrElse(Option.scala:189)
     at org.apache.spark.SparkConf.get(SparkConf.scala:245)
     ... 47 elided
   ```




-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to