dongjoon-hyun commented on code in PR #52954:
URL: https://github.com/apache/spark/pull/52954#discussion_r2507207097


##########
core/src/main/scala/org/apache/spark/SparkContext.scala:
##########
@@ -454,7 +454,14 @@ class SparkContext(config: SparkConf) extends Logging {
 
     // Set Spark driver host and port system properties. This explicitly sets 
the configuration
     // instead of relying on the default value of the config constant.
-    _conf.set(DRIVER_HOST_ADDRESS, _conf.get(DRIVER_HOST_ADDRESS))
+    if (master.startsWith("k8s") &&
+      _conf.getBoolean("spark.kubernetes.executor.useDriverPodIP", 
defaultValue = false)) {

Review Comment:
   As a side node, although we recommend to mention `defaultValue =`, let's 
simplify like the following like the other places of `getBoolean` in 
`SparkContext` file.
   ```scala
   _conf.getBoolean("spark.kubernetes.executor.useDriverPodIP", defaultValue = 
false)) {
   _conf.getBoolean("spark.kubernetes.executor.useDriverPodIP", false)) {
   ```



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

To unsubscribe, e-mail: [email protected]

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