Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-42656][CONNECT][FOLLOWUP] Fix the spark-connect script
### What changes were proposed in this pull request? The spark-connect script is broken as it need a jar at the end. Also ensured when scala 2.13 is set, all commands in the scripts runs with `-PScala-2.13` Example usage: Start spark connect with default settings: * `./connector/connect/bin/spark-connect-shell` * or `./connector/connect/bin/spark-connect` (Enter "q" <new line> to exit the program) Start Scala client with default settings: `./connector/connect/bin/spark-connect-scala-client` Start spark connect with extra configs: * `./connector/connect/bin/spark-connect-shell --conf spark.connect.grpc.binding.port=8888` * or `./connector/connect/bin/spark-connect --conf spark.connect.grpc.binding.port=8888` Start Scala client with a connection string: ``` export SPARK_REMOTE="sc://localhost:8888/" ./connector/connect/bin/spark-connect-scala-client ``` ### Why are the changes needed? Bug fix ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Manually tested on 2.12 and 2.13 for all the scripts changed. Test example with expected results: `./connector/connect/bin/spark-connect-shell` : <img width="1050" alt="Screen Shot 2023-03-08 at 2 14 31 PM" src="https://user-images.githubusercontent.com/4190164/223863343-d5d159d9-da7c-47c7-b55a-a2854c5f5d76.png"> Verify the spark connect server is started at the correct port, e.g. ``` >Telnet localhost 15002 Trying ::1... Connected to localhost. Escape character is '^]'. ``` `./connector/connect/bin/spark-connect`: <img width="1680" alt="Screen Shot 2023-03-08 at 2 13 09 PM" src="https://user-images.githubusercontent.com/4190164/223863099-41195599-c49d-4db4-a1e2-e129a649cd81.png"> Server started successfully when seeing the last line output. `./connector/connect/bin/spark-connect-scala-client`: <img width="1658" alt="Screen Shot 2023-03-08 at 2 11 58 PM" src="https://user-images.githubusercontent.com/4190164/223862992-c8a3a36a-9f69-40b8-b82e-5dab85ed14ce.png"> Verify the client can run some simple quries. Closes apache#40344 from zhenlineo/fix-scripts. Authored-by: Zhen Li <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
- Loading branch information