Skip to content

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

Open
miinhho wants to merge 1 commit into
apache:masterfrom
miinhho:refactor/specific-exception-in-spark-scala-fallback
Open

[ZEPPELIN-6548] Use specific exceptions for Spark Scala fallback detection#5340
miinhho wants to merge 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

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.

1 participant