pan3793 commented on code in PR #52923:
URL: https://github.com/apache/spark/pull/52923#discussion_r2503617516
##########
core/src/main/scala/org/apache/spark/SparkEnv.scala:
##########
@@ -369,6 +371,11 @@ object SparkEnv extends Logging {
logInfo(log"Registering ${MDC(LogKeys.ENDPOINT_NAME, name)}")
rpcEnv.setupEndpoint(name, endpointCreator)
} else {
+ val useDriverPodIP =
+ conf.get("spark.kubernetes.executor.useDriverPodIP",
"false").equalsIgnoreCase("true")
+ if (useDriverPodIP) {
+ conf.set(config.DRIVER_HOST_ADDRESS.key,
conf.get(config.DRIVER_BIND_ADDRESS.key))
Review Comment:
@dongjoon-hyun check my proposed idea, works on my side.
```patch
- _conf.set(DRIVER_HOST_ADDRESS, _conf.get(DRIVER_HOST_ADDRESS))
+ if (master.startsWith("k8s") &&
+ _conf.getBoolean("spark.kubernetes.executor.useDriverPodIP", false))
{
+ _conf.set(DRIVER_HOST_ADDRESS, _conf.get(DRIVER_BIND_ADDRESS))
+ } else {
+ _conf.set(DRIVER_HOST_ADDRESS, _conf.get(DRIVER_HOST_ADDRESS))
+ }
```
checklist:
- `spark.kubernetes.executor.useDriverPodIP` only takes effect on K8s mode
- when `s.k.e.useDriverPodIP` is true, check UI `Executors` and
`Environment` tabs, driver address displays correctly in IP, not svc endpoint
<img width="574" height="189" alt="image"
src="https://github.com/user-attachments/assets/9e538448-b66f-482b-b97a-ae1ee00601b3"
/>
<img width="969" height="125" alt="image"
src="https://github.com/user-attachments/assets/27f77899-1e04-40de-9f23-a66e5e6e3ce3"
/>
- run some queries, shuffle works as expected. (we use Apache Celeborn as
Remote Shuffle Service)
- we have a custom driver feature step to set up ingress for live UI, which
depends on the driver's svc, except for this, all built-in functionality that
we use works with the driver svc disabled.
--
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]