This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new a6bed5e9bcc5 [SPARK-47040][CONNECT] Allow Spark Connect Server Script 
to wait
a6bed5e9bcc5 is described below

commit a6bed5e9bcc54dac51421263d5ef73c0b6e0b12c
Author: Martin Grund <martin.gr...@databricks.com>
AuthorDate: Wed Feb 14 03:03:30 2024 -0800

    [SPARK-47040][CONNECT] Allow Spark Connect Server Script to wait
    
    ### What changes were proposed in this pull request?
    Add an option to the command line of `./sbin/start-connect-server.sh` that 
leaves it running in the foreground for easier debugging.
    
    ```
    ./sbin/start-connect-server.sh --wait
    ```
    
    ### Why are the changes needed?
    Usability
    
    ### Does this PR introduce _any_ user-facing change?
    
    ### How was this patch tested?
    Manual
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No
    
    Closes #45090 from grundprinzip/start_server_wait.
    
    Authored-by: Martin Grund <martin.gr...@databricks.com>
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
 sbin/start-connect-server.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sbin/start-connect-server.sh b/sbin/start-connect-server.sh
index a347f43db8b1..fecda717eb34 100755
--- a/sbin/start-connect-server.sh
+++ b/sbin/start-connect-server.sh
@@ -38,4 +38,10 @@ fi
 
 . "${SPARK_HOME}/bin/load-spark-env.sh"
 
-exec "${SPARK_HOME}"/sbin/spark-daemon.sh submit $CLASS 1 --name "Spark 
Connect server" "$@"
+if [ "$1" == "--wait" ]; then
+  shift
+  exec "${SPARK_HOME}"/bin/spark-submit --class $CLASS 1 --name "Spark Connect 
Server" "$@"
+else
+  exec "${SPARK_HOME}"/sbin/spark-daemon.sh submit $CLASS 1 --name "Spark 
Connect server" "$@"
+fi
+


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to