hvanhovell commented on code in PR #40257: URL: https://github.com/apache/spark/pull/40257#discussion_r1123660107
########## bin/spark-connect-scala-client: ########## @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# Use the spark connect JVM client to connect to a spark connect server. +# +# Start a local server: +# A local spark-connect server with default settings can be started using the following command: +# `bin/spark-connect` +# The client should be able to connect to this server directly with the default client settings. +# +# Connect to a remote server: +# To connect to a remote server, use env var `SPARK_REMOTE` to configure the client connection +# string. e.g. +# `export SPARK_REMOTE="sc://<URL>:<port>/;token=<auth token>;<param1>=<value1>"` + +if [ -z "${SPARK_HOME}" ]; then + source "$(dirname "$0")"/find-spark-home +fi + +# Build the jars needed for spark connect JVM client +build/sbt "sql/package;connect-client-jvm/assembly" + +CONNECT_CLASSPATH="$(build/sbt -DcopyDependencies=false "export connect-client-jvm/fullClasspath" | grep jar | tail -n1)" +SQL_CLASSPATH="$(build/sbt -DcopyDependencies=false "export sql/fullClasspath" | grep jar | tail -n1)" + +INIT_SCRIPT="${SPARK_HOME}"/bin/spark-connect-scala-client.sc +"${SPARK_HOME}"/build/scala*/bin/scala -cp "$CONNECT_CLASSPATH:$SQL_CLASSPATH" -i $INIT_SCRIPT Review Comment: TIL you can do this :)... I have multiple scala versions floating around in my spark dir. We should pick the current one... -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org