Skip to content
Closed
Show file tree
Hide file tree
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
6 changes: 2 additions & 4 deletions core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -996,14 +996,14 @@ private[spark] class SparkSubmit extends Logging {
// TODO(SPARK-42375): Should point out the user-facing page here instead.
logInfo("You need to specify Spark Connect jars with --jars or --packages.")
}
throw new SparkUserAppException(CLASS_NOT_FOUND_EXIT_STATUS)
throw new SparkUserAppException(SparkExitCode.CLASS_NOT_FOUND)
case e: NoClassDefFoundError =>
logError(log"Failed to load ${MDC(LogKeys.CLASS_NAME, childMainClass)}", e)
if (e.getMessage.contains("org/apache/hadoop/hive")) {
logInfo("Failed to load hive class.")
logInfo("You need to build Spark with -Phive and -Phive-thriftserver.")
}
throw new SparkUserAppException(CLASS_NOT_FOUND_EXIT_STATUS)
throw new SparkUserAppException(SparkExitCode.CLASS_NOT_FOUND)
}

val app: SparkApplication = if (classOf[SparkApplication].isAssignableFrom(mainClass)) {
Expand Down Expand Up @@ -1080,8 +1080,6 @@ object SparkSubmit extends CommandLineUtils with Logging {
private val SPARKR_PACKAGE_ARCHIVE = "sparkr.zip"
private val R_PACKAGE_ARCHIVE = "rpkg.zip"

private val CLASS_NOT_FOUND_EXIT_STATUS = 101

// Following constants are visible for testing.
private[deploy] val YARN_CLUSTER_SUBMIT_CLASS =
"org.apache.spark.deploy.yarn.YarnClusterApplication"
Expand Down
3 changes: 3 additions & 0 deletions core/src/main/scala/org/apache/spark/util/SparkExitCode.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ private[spark] object SparkExitCode {
OutOfMemoryError. */
val OOM = 52

/** Exit due to ClassNotFoundException or NoClassDefFoundError. */
val CLASS_NOT_FOUND = 101

/** Exit because the driver is running over the given threshold. */
val DRIVER_TIMEOUT = 124

Expand Down