-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-42656][CONNECT][Followup] Fix the spark-connect script #40344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@zhenlineo would you mind supplying more details about your test steps and results? Actually, I have been trying these scripts since you added them the first time, finally, it success w/ a workaround(by adding an extra parameter |
pan3793
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for fixing this, I can reproduce your test results by using Java 8 and Scala 2.12.
hvanhovell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Merged to master and branch-3.4. |
### 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 #40344 from zhenlineo/fix-scripts. Authored-by: Zhen Li <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]> (cherry picked from commit b5243d7) Signed-off-by: Hyukjin Kwon <[email protected]>
### 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]> (cherry picked from commit b5243d7) Signed-off-by: Hyukjin Kwon <[email protected]>
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.13Example usage:
Start spark connect with default settings:
./connector/connect/bin/spark-connect-shell./connector/connect/bin/spark-connect(Enter "q" to exit the program)Start Scala client with default settings:
./connector/connect/bin/spark-connect-scala-clientStart spark connect with extra configs:
./connector/connect/bin/spark-connect-shell --conf spark.connect.grpc.binding.port=8888./connector/connect/bin/spark-connect --conf spark.connect.grpc.binding.port=8888Start Scala client with a connection string:
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:Verify the spark connect server is started at the correct port, e.g.
./connector/connect/bin/spark-connect:Server started successfully when seeing the last line output.
./connector/connect/bin/spark-connect-scala-client:Verify the client can run some simple quries.