Skip to content

[ZEPPELIN-6548] Use specific exceptions for Spark Scala fallback detection - #5340

Merged
jongyoul merged 1 commit into
apache:masterfrom
miinhho:refactor/specific-exception-in-spark-scala-fallback
Aug 9, 2026
Merged

[ZEPPELIN-6548] Use specific exceptions for Spark Scala fallback detection#5340
jongyoul merged 1 commit into
apache:masterfrom
miinhho:refactor/specific-exception-in-spark-scala-fallback

Conversation

@miinhho

@miinhho miinhho commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

What is this PR for?

This PR refines exception types in SparkInterpreterLauncher when the fallback Spark Scala version detection validates the SPARK_HOME/jars layout.

Previously, detectSparkScalaVersionByReplClass(...) threw generic Exception for expected validation failures such as missing or duplicate spark-repl jars, or an unsupported spark-repl Scala suffix. This PR replaces those generic throw sites with more specific exception types while keeping the existing messages and caller behavior unchanged.

Missing or duplicate spark-repl jars now throw IOException, and an unrecognized Scala suffix now throws IllegalArgumentException.

This PR is a follow-up to ZEPPELIN-6464

What type of PR is it?

Improvement

What is the Jira issue?

How should this be tested?

  • Build and run the module tests:
./mvnw test -pl zeppelin-server --am

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@jongyoul jongyoul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Thanks for replacing raw Exception with specific exception types in SparkInterpreterLauncher.

@jongyoul
jongyoul merged commit 2147d79 into apache:master Aug 9, 2026
28 of 30 checks passed
@jongyoul

jongyoul commented Aug 9, 2026

Copy link
Copy Markdown
Member

Merged into master (2147d79).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants