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-51149][CORE] Log classpath in SparkSubmit on ClassNotFoundException #49870

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vrozov
Copy link
Member

@vrozov vrozov commented Feb 11, 2025

What changes were proposed in this pull request?

The PR adds logging of the classpath in SparkSubmit when SparkApp throws ClassNotFoundException.

Why are the changes needed?

When class is submitted to Spark for execution using SparkSubmit, it may depend on other classes for which libraries are missing on the classpath (for example due to incorrect --jar option or bad install). Logging classpath helps to troubleshoot a missing dependency.

Does this PR introduce any user-facing change?

Yes, classpath is logged when ClassNotFoundException is raised while running application

How was this patch tested?

The patch only impacts logging. Logging was manually verified.

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the CORE label Feb 11, 2025
@pan3793
Copy link
Member

pan3793 commented Feb 11, 2025

Seems you can use spark-submit --verbose ... to rerun the failed cases to know the classpath.

I think verbose error messages should help administrators diagnose the issue, but they might also scare users. Keeping the default error message clear and short, and providing a --verbose might be a good balance.

@vrozov
Copy link
Member Author

vrozov commented Feb 11, 2025

I don't think that --verbose outputs the full classpath and between enhancing --verbose to log classpath and logging classpath on the specific error that relates to the classpath issue, IMO the better option is to log the classpath on the error.

@vrozov
Copy link
Member Author

vrozov commented Feb 11, 2025

@dongjoon-hyun Please review

1 similar comment
@vrozov
Copy link
Member Author

vrozov commented Feb 13, 2025

@dongjoon-hyun Please review

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

Successfully merging this pull request may close these issues.

2 participants