Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ private String detectSparkScalaVersionByReplClass(String sparkHome) throws Excep
}

if (sparkReplJars.isEmpty()) {
throw new Exception("No spark-repl jar found in SPARK_HOME: " + sparkHome);
throw new IOException("No spark-repl jar found in SPARK_HOME: " + sparkHome);
}
if (sparkReplJars.size() > 1) {
throw new Exception("Multiple spark-repl jar found in SPARK_HOME: " + sparkHome);
throw new IOException("Multiple spark-repl jar found in SPARK_HOME: " + sparkHome);
}

String fileName = sparkReplJars.get(0).getFileName().toString();
Expand All @@ -330,7 +330,7 @@ private String detectSparkScalaVersionByReplClass(String sparkHome) throws Excep
} else if (fileName.contains("spark-repl_2.13")) {
return "2.13";
} else {
throw new Exception("Can not detect the scala version by spark-repl");
throw new IllegalArgumentException("Can not detect the scala version by spark-repl");
}
}

Expand Down
Loading