Skip to content
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

[SPARK-47040][CONNECT] Allow Spark Connect Server Script to wait #45090

Closed
wants to merge 1 commit into from

Conversation

grundprinzip
Copy link
Contributor

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

@dongjoon-hyun dongjoon-hyun changed the title [MINOR][CONNECT] Allow Spark Connect Server Script to wait [SPARK-47040][CONNECT] Allow Spark Connect Server Script to wait Feb 14, 2024
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM.

@pan3793
Copy link
Member

pan3793 commented Feb 15, 2024

... that leaves it running in the foreground ...

could it be achieved by the following command?

SPARK_NO_DAEMONIZE=1 ./sbin/start-connect-server.sh

@dongjoon-hyun
Copy link
Member

Oh, right. Does it work in the same with this?

@dongjoon-hyun
Copy link
Member

If then, we need to revert this. Could you confirm that the above works for you, @grundprinzip ?

@grundprinzip
Copy link
Contributor Author

If then, we need to revert this. Could you confirm that the above works for you, @grundprinzip ?

I will not revert the patch because it has significantly better developer ergonomics over obscure environment variables. I created a PR to use the env variable instead of calling spark-submit directly.

#45117

@pan3793
Copy link
Member

pan3793 commented Feb 20, 2024

... it has significantly better developer ergonomics over obscure environment variables.

I would recommend removing --wait, just use env var and update https://spark.apache.org/developer-tools.html to mention that.

@grundprinzip There are several server components in Spark, like Thrift Server, History Server, Master, Worker, only adding --wait on the Connect Server makes things inconsistent, while env vars approach is adopted widely in Spark for different develop/test purposes. Additionally, --wait is not quite accurate, it also affects stdout/stderr redirection not just process exiting.

@dongjoon-hyun
Copy link
Member

@pan3793 's point makes sense to me in terms of the consistency inside Apache Spark.

How do you think about that, @grundprinzip ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants