dongjoon-hyun opened a new pull request, #42841:
URL: https://github.com/apache/spark/pull/42841

   ### What changes were proposed in this pull request?
   
   This PR aims to support a new configuration `spark.master.rest.host` to 
allow REST Server to choose a host to listen.
   
   ### Why are the changes needed?
   
   In K8s environment, it's difficult to use `port-forward` because the AS-IS 
Spark REST Server only listens the podIP and not 127.0.0.1. K8s port-forwarding 
only works with 127.0.0.1.
   
   ```
   $ SPARK_NO_DAEMONIZE=1 SPARK_MASTER_OPTS="-Dspark.master.rest.enabled=true 
-Dspark.master.rest.host=0.0.0.0" sbin/start-master.sh
   ```
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Manually start the REST API.
   ```
   $ SPARK_NO_DAEMONIZE=1 SPARK_MASTER_OPTS="-Dspark.master.rest.enabled=true 
-Dspark.master.rest.host=0.0.0.0" sbin/start-master.sh
   ```
   
   Connect with both IPs (public and 127.0.0.1) on the machine.
   ```
   $ curl -v http://127.0.0.1:6066/v1/submissions/status/0 
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No.


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